Life cycle of ASP.Net Web Form Page Request >> Start >> Page Init >> Page Load >> Validation >> PostBack Event Handling >> Page Rendering >> Page Unload Page Request - When the page is requested ASP.Net determines whether the page is to be parsed and compiled or a cached verion of the page is to be sent without running the page. Start - Page propertied REQUEST and RESPONSE are SET, if the page is pastback request then the IsPostBack property is SET and in addition to this UICulture property is also SET. Page Initilization - In this the UniqueID of each property is SET. If the request was postback the data is not yet loaded from the viewstate. Page Load - If it was a postback request then the data gets loaded in the control from the ViewState and control property are set. Validation - If any control validation present, they are performed and IsValid property is SET for each control. PostBack Event Handling - If it was a postback request then any event handlers are called. Page Rendering - Before this the viewstate is saved from the page and RENDER method of each page is called. Page Unload - Page is fully rendered and sent to the client(Browser) and is discarded. Page property RESPONSE and REQUEST are unloaded. (More...)

It is false. For NonPostback controls it is true but for postback controls, ASP.NET retrieves their values one by one from the HTTP request and copies them to the control values while creating the HTTP response. (More...)

This Preinit event will first check this things Check the IsPostBack property to determine whether this is the first time the page is being processed. Create or re-create dynamic controls. Set a master page dynamically. Set the Theme property dynamically. Read or set profile property values. (More...)

- View state is maintained in page level only.- View state of one page is not visible in another page.- View state information stored in client only.- View state persist the values of particular page in the client (browser) when post back operation done.- View state used to persist page-instance-specific data. (Read more)

Session State:

- Session state is maintained in session level.- Session state value is available in all pages within a user session.- Session state information stored in server.- Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)

Usage

- If you want to access the information on different web pages, you can use SessionState- If you want to access from the same page, then you can use Viewstate-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side (More...)

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.