Page_Load in server side code for Dialog
I open modal dialog window from main.
Page_Load in dialog window will get triggered only once for the wholw session.
I mean, even I close dialog window, the server code will not get triggered next time I open dialog again.
What is the problem??
Thank you all !
resolved Re: Page_Load in server side code for Dialog
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