L
Larry Morris
The following code, pasted into a web form with a link button on it, will
cause the page_unload event to fire twice. If I remove the
response.redirect, the problem goes away . I've got a work around, but I'm
curious how one is supposed to programmatically navigate between web pages
without the page_unload event firing twice.
Thanks,
Larry
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Stop
End Sub
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Unload
Stop
End Sub
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LinkButton1.Click
Response.Redirect("http://www.microsoft.com")
End Sub
End Class
cause the page_unload event to fire twice. If I remove the
response.redirect, the problem goes away . I've got a work around, but I'm
curious how one is supposed to programmatically navigate between web pages
without the page_unload event firing twice.
Thanks,
Larry
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Stop
End Sub
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Unload
Stop
End Sub
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LinkButton1.Click
Response.Redirect("http://www.microsoft.com")
End Sub
End Class