NET Web Forms pages is that you can program them using an event-based model that is similar to that in client applications.
NET Web Forms server controls work somewhat differently than events in traditional HTML pages or in client-based Web applications.
The difference arises primarily because of the separation of the event itself from where the event is handled. NET Web Forms control event model requires that the event information be captured on the client and an event message transmitted to the server, through an HTTP post.
In client-based applications, events are raised and handled on the client. NET Web Forms pages, however, events associated with server controls originate on the client (browser) but are handled on the Web server by the ASP. The page must interpret the post to determine what event occurred and then call the appropriate method in your code on the server to handle the event. NET handles the task of capturing, transmitting, and interpreting the event. NET Web Forms page, you can typically do so without thinking about how the event information is captured and made available to your code.
Instead, you can create event handlers in much the same way you would in a traditional client form. NET Web Forms server control events require a round trip to the server for processing, they can affect the performance of a page. NET Web Forms page and control events follow a standard . All events pass two arguments: an object representing the object that raised the event, and an event object containing any event-specific information.
However, there are some aspects of event handling in ASP. Therefore, server controls offer a limited set of events, usually only click-type events. The second argument is usually of type In Web Forms server controls, certain events, typically click events, cause the page to be posted back immediately to the server.
Change events in HTML server controls and Web server controls, such as the ) are raised, and then control events are processed.You should not create application logic that relies on the change events being raised in a specific order unless you have detailed knowledge of page event processing.For details, see control can contain one or more buttons created dynamically by templates.Rather than each button raising an event individually, events from the nested controls are forwarded to the container control.The container in turn raises a generic event with parameters that allow you to discover which individual control raised the original event.By responding to this single event, you can avoid having to write individual event handlers for child controls.