Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding Page_Unload
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00958621
Message ID:
00958659
Views:
16
My guess would be that the unload event fires too late. Your last chance at rendering output would be in the PreRender or Render events/methods. Look at the page lifecycle.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-pageobjectmodel.asp
>I would like to understand how the Page_Unload() is suppose to work. According to some research, the following is said:
>
>The Page_Unload event happens when the page has finished being processed by ASP.NET, and before it's sent to the browser.
>
>If that is true, then, why doesn't the following work:
>
>
>    ' Perform any cleanup here!
>    Sub Page_Unload(ByVal Sender As System.Object, ByVal e As System.EventArgs)
>        Response.Write("<SCRIPT>")
>        Response.Write("alert(""The page has finished loading."")")
>        Response.Write("</SCRIPT>")
>    End Sub
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform