.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

When during the page processing cycle is ViewState available?

Posted By :shahin     Posted Date :November 22, 2009    Points :10   Category :ASP.Net 
The view state is available after the Init() and before the Render() methods are called during Page load.

You can also find related Interview Question to When during the page processing cycle is ViewState available?  below: 

When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control. (More...)

Explain the life cycle of an ASP .NET page.

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
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...)

Which is the first event in page life-cycle Event?

Page_PreInit is the First event that will be executed on the page. (More...)

Does ViewState is responsible for maintaining data across the Page Post Back for Postback controls (like textbox, dropdownlist) and non-postbackcontrols(like label)?

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...)

How many ViewState objects can be created on an aspx page ?

There is no limit. You can have any number of ViewState object on single aspx page. However more Viewstate objects, more slowly it loads. (More...)

Which is the first event in page life-cycle Event?

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...)

page life cycle in Asp.net?

1. OnInit (Init) -- Inializes all Child controls on the Page

2. LoadControlState -- Loads the Control State

3. LoadViewState -- Loads the View State

4. LoadPostData -- Control properties are set according to the received form data

5. Load -- Actions can be performed on the controls as all the pre-activities are complete by this time

6. RaisePostDataChangedEvent -- This event is raised if data has been changed in previous and Current Postbacks.

7. RaisePostBackEvent -- This event handles the user action that caused the Postback.

8. PreRender (OnPreRender) -- This event takes place between postback and saving viewstate. Till this stage changes will be saved to the control.

9. SaveControlState -- Self Explanatory

10. SaveViewState -- Self Explanatory

11. Render -- Generates artifacts at Client side (HTML,DHTML,Scripts) to properly display controls

12. Dispose -- Releases unmanaged Resource ( Database connections, file handles)

13. Unload -- Releases managed Resources ( Instances created by CLR) (More...)

What are different stages of ASP.Net Page Life cycle?

Each ASP.Net Web page performs following stages/events

Page Initialization (Page_Init event)
Page Loading (Page_Load event)
Page Prerender (Page_Prerender)
Page Render (Page_Render)
Page Unload (Page_Unload)


what are the list the events in page life cycle.

Below is the list of page life cycle in asp.net-
1) Page_PreInit
2) Page_Init
3) Page_InitComplete
4) Page_PreLoad
5) Page_Load
6) Page_LoadComplete
7) Page_PreRender
8)Render (More...)

What's Sharepoint page life cycle?

Sharepoint page Life Cycle:

1.User request the SharePoint page using http
2.Asp.Net calls the WSS file Provider
3.WSS file Provider return the pages from file or database
4.page is parsed by SafeMode parsor if required
5.Returned page is compiled by Asp.Net compiler
6.WSS file Provider collects the page layout class and complies it
7.Asp.Net engine adds SharePoint Context Data to the site meta data and retrieves the associatedmaster page.
8.Master page got compiled responded back to the user. (More...)

What is the difference between ViewState,Application and Session of a Page?

View State:

- 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)


- 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


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

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

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.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend