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
Unloadis the last event in the life cycle of an ASP.NET page .
Unload
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.
.
Unload *. . "" "" ; , , - , Web Forms .
, , IsPostBack, , - . , .
IsPostBack
, , , - ( ), , .
* ( , , . - .)
: . , , , ( ) .
, 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.