Skip to main content

Posts

Showing posts from September, 2013

What is Assembly in .Net? Contents of Assembly

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly. An assembly does the following functions: • It contains the code that the runtime executes. • It forms a security boundary. An assembly is the unit at which permissions are requested and granted. • It forms a type boundary. Every type’s identity includes the name of the assembly at which it resides. • It forms a reference scope boundary. The assembly's manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types

jquery: stopPropagation vs stopImmediatePropagation

stopPropagation  will prevent any  parent  handlers from being executed while stopImmediatePropagation  will do the same  but also  prevent other handlers from executing. Quick example from the  jquery documentation: $ ( "p" ). click ( function ( event ){ event . stopImmediatePropagation (); }); $ ( "p" ). click ( function ( event ){ // This function won't be executed $ ( this ). css ( "background-color" , "#f00" ); });

CHECK IF FUNCTION EXISTS EXAMPLE

http://css-tricks.com/snippets/javascript/check-if-function-exists-before-calling/ When using scripts that are shared between different areas of a site, there may be cases where a function is called that doesn't exist. It makes sense on one page (the dependency is there) but not another. The difference is too slight to warrant forking the file into different versions. Instead, you can just check if the function exists before calling it to avoid the error: if ( typeof yourFunctionName == 'function' ) { yourFunctionName ( ) ; } jQuery code snippet to check whether a function exists within the JavaScript code. This can be easily achieved by using the jQuery.isFunction() function. Useful for checking if a jQuery function exists before calling it! < script type = "text/javascript" >      function  somenoobfunction ( )   {      }         // using jQuery      if   ( $. isFunction ( window. somenoobfunction ) )   {          //execute it         s
private void ClearInputs(ControlCollection ctrls) {     foreach (Control ctrl in ctrls)     {         if (ctrl is TextBox)             ((TextBox)ctrl).Text = string.Empty;         ClearInputs(ctrl.Controls);     } } protected void btnClear_Click(object sender, EventArgs e) {     ClearInputs(Page.Controls); }

How to change placeholder text color

< style type ="text/css">     input::-webkit-input-placeholder , textarea::-webkit-input-placeholder     {         color : #555 ;     }     input:focus::-webkit-input-placeholder , textarea:focus::-webkit-input-placeholder     {         color : #c4c7c8 ;     }             /* Firefox < 19 */     input:-moz-placeholder , textarea:-moz-placeholder     {             color : #555 ; opacity : 1 ;     }     input:focus:-moz-placeholder , textarea:focus:-moz-placeholder     {         color : #c4c7c8 ;     }             /* Firefox > 19 */     input::-moz-placeholder , textarea::-moz-placeholder     {             color : #555 ; opacity : 1 ;     }     input:focus::-moz-placeholder , textarea:focus::-moz-placeholder     {         color : #c4c7c8 ;     }             /* Internet Explorer 10 */     input:-ms-input-placeholder , textarea:-ms-input-placeholder     {             color : #555 ;     }     inpu

Various components of the .NET Platform and the functions performed by them

Now we will go in detail about the various components that build the .NET framework and its functionalities. Common Language Runtime At the core of the .NET platform is the Common Language Runtime (CLR). The CLR simplifies application development, provides a robust and secure execution environment, supports multiple languages and simplifies application deployment and management. The diagram below provides more details on the CLR's features: In this section we will cover some of the more significant features provided to .NET applications by the CLR. These include: • Memory Management • Common Type System Before moving further let us discuss briefly about Common Language Infrastructure(CLI) according to Standardizing Information and Communication Systems(ECMA) specifications. The Microsoft Shared Source CLI Implementation is a file archive containing working source code for the ECMA-334 (C#) and ECMA-335 (Common Language Infrastructure, or CLI) s

Where does .NET fit in? - .Net Basics

The driving force behind Microsoft® .NET is a shift in focus from individual Web sites or devices to new constellations of computers, devices, and services that work together to deliver broader, richer solutions. The platform, technology that people use is changing. Since 1992, the client/server environment has been in place, with people running the applications they need on the Win32 platform, for example. Information is supplied by the databases on the servers, and programs that are installed on the client machine determine how that information is presented and processed. One of the things people are looking for is a one-sentence definition of ".NET". What is it? Why should I care? .NET is Microsoft's strategy for software that empowers people any time, any place, and on any device. Many of the goals Microsoft had in mind when designing .NET reflect the limitations we previously discussed for development with previous tools and technologies. Microsoft.N

Benefits of using .NET architecture - .Net Basics

• The Microsoft .NET platform's reliance on XML for data exchange—an open standard managed by the World Wide Web Consortium (W3C)—and modular XML Web services removes barriers to data sharing and software integration. • The .NET platform, through the .NET Framework's common language runtime, enables XML Web services to interoperate whatever their source language. Developers can build reusable XML Web services instead of monolithic applications. By making it easy to offer your XML Web services to others. • The ability to easily find available XML Web services means you can buy pieces of your applications rather than build everything from scratch, focusing your time and money where it makes the most sense. • Easier to build sophisticated development tools – debuggers and profilers can target the Common Language Runtime, and thus become accessible to all .NET-enabled languages. • Potentially better performance in system level code for memory management, garbage

Basic functionalities of 3 – Tier or N-Tier Applications- .Net Basics

The presentation services tier is responsible for: • Gathering information from the user • Sending the user information to the business services for processing • Receiving the results of the business services processing • Presenting those results to the user The business services tier is responsible for: • Receiving input from the presentation tier. • Interacting with the data services to perform the business operations. • Sending the processed results to the presentation tier. The data services tier is responsible for the: • Storage of data. • Retrieval of data. • Maintenance of data. • Integrity of data.

Important Features of .NET - .Net Basics

Now that we know some basics of .NET, let us see what makes .NET a wonderful platform for developing modern applications. Rich Functionality out of the box .NET framework provides a rich set of functionality out of the box. It contains hundreds of classes that provide variety of functionality ready to use in your applications. This means that as a developer you need not go into low level details of many operations such as file IO, network communication and so on. Easy development of web applications ASP.NET is a technology available on .NET platform for developing dynamic and data driven web applications. ASP.NET provides an event driven programming model (similar to Visual Basic 6 that simplify development of web pages (now called as web forms) with complex user interface. ASP.NET server controls provide advanced user interface elements (like calendar and grids) that save lot of coding from programmer’s side. OOPs Support The advantages of Object Oriented program