Tuesday, May 20, 2014

ASP.NET Server control Events

ASP.NET server control, such as TextBox, Button, and DropDownList has their own events. And also have validation controls, that has validation events. The events that these controls expose, can be broadly divided into 3 categories.

  • PostBack events – These events submit the web page, immediately to the server for processing. Click event of a button control is an example for PostBack event.
  • Cached events – These events are saved in the page’s view state to be processed when a postback event occurs. TextChanged event of Textbox control, and SelectedIndexChanged event of a DropDownList control are examples of cached events.
  • Cached events can be converted into postback events, by setting the AutoPostBack property of the control to true.
  • Validation events – These events occur on the client, before the page is posted back to the server. All validation controls use these type of events.

No comments:

Post a Comment