Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Modal Window Trouble

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Laurahn - 01 Jun 2007 18:12 GMT
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.
Walter Wang [MSFT] - 04 Jun 2007 07:01 GMT
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 (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.
Walter Wang [MSFT] - 08 Jun 2007 03:42 GMT
Hi Laurahn,

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

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.
Laurahn - 08 Jun 2007 21:50 GMT
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.
GeezerButler - 04 Jun 2007 08:20 GMT
> 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'

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.