Modal Window Trouble

L

Laurahn

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.
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 
G

GeezerButler

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'
 
W

Walter Wang [MSFT]

Hi Laurahn,

Please give us more information so that we can help. Thanks.


Regards,
Walter Wang ([email protected], 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.
 
L

Laurahn

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)
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top