Modal Window Trouble

Discussion in 'ASP .Net' started by Laurahn, Jun 1, 2007.

  1. Laurahn

    Laurahn Guest

    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.
    Laurahn, Jun 1, 2007
    #1
    1. Advertising

  2. 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.
    Walter Wang [MSFT], Jun 4, 2007
    #2
    1. Advertising

  3. Laurahn

    GeezerButler Guest

    On Jun 1, 10:12 pm, "Laurahn" <> 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'
    GeezerButler, Jun 4, 2007
    #3
  4. 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.
    Walter Wang [MSFT], Jun 8, 2007
    #4
  5. Laurahn

    Laurahn Guest

    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)
    Laurahn, Jun 8, 2007
    #5
  6. 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.
    Walter Wang [MSFT], Jun 11, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    3,115
    Whitecrest
    Jun 1, 2004
  2. Laurahn

    Modal Window Trouble

    Laurahn, Jun 10, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    289
    Laurahn
    Jun 10, 2007
  3. Laurahn

    Modal Window Trouble

    Laurahn, Jun 10, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    276
    Laurahn
    Jun 10, 2007
  4. Matt
    Replies:
    0
    Views:
    204
  5. gopal srinivasan
    Replies:
    0
    Views:
    213
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page