Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What r the page life cycle in asp.net page?

Answer Posted / dipal bhavsar

1. OnInit (Init) Initializes each child control of the current

2. LoadControlState: Loads the ControlState of the control.
To use this
method the control must call the
Page.RegisterRequiresControlState method in
the OnInit method of the control.

3. LoadViewState: Loads the ViewState of the control.

4. LoadPostData: Is defined on interface
IPostBackDataHandler. Controls that
implement this interface use this method to retrieve the
incoming form data and
update the control s properties accordingly.

5. Load (OnLoad): Allows actions that are common to every
request to be
placed here. Note that the control is stable at this time;
it has been
initialized and its state has been reconstructed.

6. RaisePostDataChangedEvent: Is defined on the interface
IPostBackData-Handler.
Controls that implement this interface use this event to
raise change events in
response to the Postback data changing between the current
Postback and the
previous Postback. For example if a TextBox has a
TextChanged event and
AutoPostback is turned off clicking a button causes the
Text-Changed event to
execute in this stage before handling the click event of the
button which is
raised in the next stage.

7. RaisePostbackEvent: Handles the client-side event that
caused the Postback
to occur

8. PreRender (OnPreRender): Allows last-minute changes to
the control. This
event takes place after all regular Post-back events have
taken place. This
event takes place before saving ViewState so any changes
made here are saved.

9. SaveControlState: Saves the current control state to
ViewState. After this
stage any changes to the control state are lost. To use this
method the
control must call the Page.RegisterRequiresControlState
method in the OnInit
method of the control.

10. SaveViewState: Saves the current data state of the
control to ViewState.
After this stage any changes to the control data are lost.

11. Render: Generates the client-side HTML Dynamic Hypertext
Markup Language
(DHTML) and script that are necessary to properly display
this control at the
browser. In this stage any changes to the control are not
persisted into
ViewState.

12. Dispose: Accepts cleanup code. Releases any unman-aged
resources in this
stage. Unmanaged resources are resources that are not
handled by the .NET common
language runtime such as file handles and database connections.

13. UnLoad

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of Using Cookies?

969


What are the asp.net list controls and difference between them?

1015


What is mvc in angular?

969


What is difference between session and application in asp net?

1012


What is event in asp.net?

1005


What are the different types of sessions in asp.net? Name them?

1181


What is routing in MVC?

1025


What is Model-View-View Model?

1011


What is the difference between response.redirect and server.transfer?

1031


What is odata in web api?

1072


Explain how is the asp.net mvc architecture different from others? : asp.net mvc

1008


Mention the namespace that is used to include .net data provider for sql server in .net code?

949


What is asp short for?

1002


Is it possible to migrate visual interdev design-time controls to asp.net?

1045


Can we handle the error and redirect to some pages using web.config?

1615