Home
ASP.Net
Interview FAQs

The global.asax file is an optional piece of an ASP.NET application. It is located in the root of the application directory structure. It cannot be directly loaded or requested by users. It provides a place to define application- and session-wide events. You can define your own events, but it does contain default Application events like when the application starts Application_Start and ends with Application_End. The same is true for Session events (Session_Start and Session_End).

You can easily traverse all controls on a form via the Web Form Controls collection. The GetType method can be used on each control to determine its type and how to work with it. Now, it gets tricky because the form contains a tree of controls; that is, some controls are contained within others (think of a Table). You would have to recursively loop through the controls to make sure everything is processed.

You can easily traverse all controls on a form via the Web Form Controls collection. The GetType method can be used on each control to determine its type and how to work with it. Now, it gets tricky because the form contains a tree of controls; that is, some controls are contained within others (think of a Table). You would have to recursively loop through the controls to make sure everything is processed.

A master page is a template for one or more Web Forms. The master page defines how the page will be laid out when presented to the user, with placeholders for content. The MasterPageFile Page Directive in a content pages header is one way to assign a master page. The content pages rely solely on content and leave layout to the master page. ASP.NET merges the content with the master page layout when the content page is requested by a user.

We can register javascript for controls using

 <CONTROL -name>Attribtues.Add(scriptname,scripttext) method.

In strong typing, the data types of variable are checked at compile time. On the other hand, in case of weak typing the variable data types are checked at runtime. In case of strong typing, there is no chance of compilation error. Scripts use weak typing and hence issues arises at runtime.

There are two options of session state management techniques in asp.net-

  • In-Process
  • Out-of-Process.

In-Process stores the session in memory on the web server.

Out-of-Process Session state management stores data in an external server.  The external server may be either a SQL Server or a State Server.  All objects stored in session are required to be serializable for Out-of-Process state management.

They exist for the life of the current page.
ViewState is stored in a hidden field on the page at client side.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.
PreviousDisplaying 40 of 46Next
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*