ASP.NET - Bug Workaround - Page Load event not fired

Page Load event not fired for pages opened with showModalDialog

Synopsis:

When opening a page as a modal window using showmodaldialog the pageload event will not fire if the page has previously opened from the window. This appears to be a problem with the caching. You must add code to prevent this in the page load event.

The Code:

   Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
		Handles MyBase.Load
        
	Response.Expires = 0
        Response.Cache.SetNoStore()
        Response.AppendHeader("Pragma", "no-cache")
   End Sub
About this page: