Database SQL Oracle MySql
Tuesday, March 11, 2014

Server-side controls

The web forms model is based on a set of primitive controls
Called server-side controls as they exist on the server and provide rendering to the client as HTML
Created using runat=server attribute on traditional HTML elements in a .aspx page
Can be referenced within server-side code using designated ID

Implicitly added as member variables to the generated Page-derived class definition

Server-side control state management
Server-side controls must manage their state
Initial GET request to a page creates the server side controls with their default values
Subsequent POST requests back to the same page creates the server side controls with the values in the POST body
Any changes made to the value of the controls during the processing of a request will be reflected when the page is rendered


Server Control Behaviors
Server controls retain their state between POST requests back to the same page
No need to re-initialize state on POST-back requests
Can not be used for cross-page POST requests
Controls that are not intrinsically included in a POST request have their state propagated via a hidden field (ViewState)
More on this later




  • Blogger Comment
  • Facebook Comment

0 comments:

Copyright © 2014 ASP.NET & C# & IIS & Crystal Report & Database & ADO.NET All Right Reserved
Designed by ASP.NET Tuts