Asp.NET Page Methods

Page Events and Methods

A very important feature of Asp.Net is that pages are created as classes. When a request is made to an Asp.Net page, an object of that page's class is created on the server, and then other operations are performed.

The following events occur on the server, respectively, about the page, and we can write subprograms for these events:

PreInit : It is the first event. It runs before the page boots.

protected void Page_PreInit(object sender, EventArgs e)
{
   //actions...
}

Init : It is the event that the page starts to load.

Load : It is the event after the page is loaded on the server. Now that the controls are ready, the features related to the controls can be used.

PreRender : It is triggered just before the Html output of the page is generated and Html output can be manipulated here.

UnLoad: It is the last step before the page is cleared from memory on the server, that is, it is removed. If there are things that need to be done when closing the page, they can be done here.

The default event of the Page object is the Load event and every asp.net page has the Page_Load subroutine by default.

Events of asp.net page class, page methods, page preinit event usage and examples, using page_load event, init, prerender unload

EXERCISES

There are no examples related to this subject.



COMMENTS




Read 699 times.

Online Users: 1651



asp-net-page-methods