Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Modal Window Trouble

Reply
Thread Tools

Modal Window Trouble

 
 
Laurahn
Guest
Posts: n/a
 
      06-01-2007
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.


 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      06-04-2007
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 (, 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.

 
Reply With Quote
 
 
 
 
GeezerButler
Guest
Posts: n/a
 
      06-04-2007
On Jun 1, 10:12 pm, "Laurahn" <leme...@newsgroups.nospam> wrote:
> 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'

 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      06-08-2007
Hi Laurahn,

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


Regards,
Walter Wang (, 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.

 
Reply With Quote
 
Laurahn
Guest
Posts: n/a
 
      06-08-2007
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)




 
Reply With Quote
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      06-11-2007
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 (, 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening modal page from modal page Don ASP .Net 0 05-27-2008 11:49 PM
Modal and non modal in same app Leila Java 0 04-26-2005 09:48 PM
How to close a parent modal window when child modal window opens? gopal srinivasan Javascript 0 11-05-2004 05:59 AM
post the form data in modal window and close the modal window. Matt HTML 1 06-01-2004 08:22 PM
post the form data in modal window and close the modal window. Matt Javascript 0 06-01-2004 07:47 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57