Destructor in Asp.net

what event is triggered when you go to another page. unloaded?

Protected Sub Edit_Unload(sender As Object, e As EventArgs) Handles Me.Unload

End Sub
+5
source share
4 answers

Unloadis the last event in the life cycle of an ASP.NET page .

From docs :

Raised for each control, and then for the page. In controls, use this event for final cleanup for specific controls, such as closing databases related to specific databases. For the page itself, use this event to perform a final cleanup, for example, closing open files and connecting to a database or completing logging or other request-specific tasks.

.

+3

Unload *. . "" "" ; , , - , Web Forms .

, , IsPostBack, , - . , .

, , , - ( ), , .

* ( , , . - .)

+3

: . , , , ( ) .

+1

, javascript . , , . , :

In it I post an example of using javascript to detect that the page is about to leave and call the server method before this happens.

0
source

All Articles