By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

Modal Window Trouble

P: n/a
Hi:

i'm using modal window (showmodelessdialog) on asp.
when the object is created i used session variables.
After the object is closed the data is remaining on the modal window when is
open again, even if i clear all session variables.
Jun 1 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Laurahn,

After carefully reviewed your post, I'm not still very clear about your
question. Would you please depict more? Such as:

1) How're you storing/removing the session variables?
2) When do you remove the session variables?

Thanks.
Regards,
Walter Wang (wa****@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.

Jun 4 '07 #2

P: n/a
On Jun 1, 10:12 pm, "Laurahn" <leme...@newsgroups.nospamwrote:
Hi:

i'm using modal window (showmodelessdialog) on asp.
when the object is created i used session variables.
After the object is closed the data is remaining on the modal window when is
open again, even if i clear all session variables.
I'm not sure if the following appiles to your case but i had a similar
problem and it was also happening only for modal dialogs (using
ShowModalDialog).
I presume you are using IE.
Go to Tool -Internet Optons ->Genral -Temp Internet files ->
Settings -Check 'Every vist to page' in 'Check for newer versions of
stored pages'

Jun 4 '07 #3

P: n/a
Hi Laurahn,

Please give us more information so that we can help. Thanks.
Regards,
Walter Wang (wa****@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.

Jun 8 '07 #4

P: n/a
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)


Jun 8 '07 #5

P: n/a
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 (wa****@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.

Jun 11 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.