i call the modal windows as:
Response.write("<script>window.showModelessDialog('myPage.aspx','window',
'center:Yes;help:No;status:false;dialogWidth:740px;dialogHeight:395px')</script>")
The first time i load the modal window it works fine, but the next time i
call the modal window, it's not doing the page load method. The second time
the modal window is showed, it shows all the values showed in the first
time.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Try
LblNum.Text = Session("Num")
lblSer.Text = CType(Session("dsSolicitud"), data.dataset).Ser
...... all other variables
Session("dsSolicitud") = Nothing
Catch ex As Exception
End Try
End Sub
the code for cleaning session variables is
Session("var") = nothing
Also the page dispose method always is ignored...(never enter)
Walter Wang [MSFT] - 11 Jun 2007 12:26 GMT
Hi Laurahn,
The Disposed event is inherited from Control class, and only fires when a
control is placed inside a container. Since a Page doesn't have a
container, the Disposed event isn't fired.
The Disposed event is called from the Dispose method, which is called
correctly for the Page class; therefore you could override the Dispose
method in your page class.
However, from your code, I can see you're using Session to store some
temporary variables. Could you please tell me why you want to do this? If
you need to clear those session variables when a page request is finished,
maybe you don't need to use Session to store them after all.
Normally when we need to persist some state across different page requests,
we can use Session, or ViewState, or global state. If it doesn't persiste
across a request, why not simply use a member variable?
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.