Saturday, 12 March 2011

Some Basic On Asp.net

What is the sequence in which ASP.NET events are processed?
Following  is the sequence in which in which the events occur:
1Page_Init
2.Page Load
3.Control Events
4.Page Unload events

How can we identity that the page is Post Back?
Page object has an "IsPostBack" property,which can be checked to know that is the page posted back.

What is event bubbling?
Server control like Datagrid,DataList and Repeater can have other child controls inside them.
Example Datagrid can have combobox inside datagrid.These child control do not raise there events by themselves ,rather they pass event to the container parent which passed to the page "ItemCommand" events.
As the child control send events to parent it is termed as event bubbling

What is the difference between "Web.config" and "Machine.config" ?
"Web.config" files apply settings to each web application while "Machine.config" file apply settings to all ASP.Net application

What is a SESSION AND APPLICATION object?
Session object store information between HTTP request for a particular user, while application object are global across users.

What is difference between "Server.transfer" and "Response.redirect"?
"Response.redirect" sends message to the browser saying that it to move to some different page while server.transfer does not send any message to the browser but redirects the user directly from the server itself.

No comments:

Post a Comment

Get all non-clustered indexes

DECLARE cIX CURSOR FOR     SELECT OBJECT_NAME(SI.Object_ID), SI.Object_ID, SI.Name, SI.Index_ID         FROM Sys.Indexes SI             ...