Modal Window

Discussion in 'ASP .Net' started by Laurahn, Jun 10, 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.

    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)

    Protected Sub Page_Disposed(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles Me.Disposed
    Dispose()
    Finalize()
    Session("dsSolicitud") = Nothing
    End Sub
     
    Laurahn, Jun 10, 2007
    #1
    1. Advertising

  2. Laurahn

    Masudur Guest

    On Jun 11, 4:15 am, "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 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)
    >
    > Protected Sub Page_Disposed(ByVal sender As Object, ByVal e As
    > System.EventArgs) Handles Me.Disposed
    > Dispose()
    > Finalize()
    > Session("dsSolicitud") = Nothing
    > End Sub


    hi....

    try this
    put
    Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
    in your page load ... of the modal window that is myPage.aspx ...

    Thanks
    Masudur
    http://www.munnacs.blogspot.com
     
    Masudur, Jun 11, 2007
    #2
    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. Leila
    Replies:
    0
    Views:
    408
    Leila
    Apr 26, 2005
  2. Matt
    Replies:
    1
    Views:
    3,150
    Whitecrest
    Jun 1, 2004
  3. Don
    Replies:
    0
    Views:
    354
  4. Matt
    Replies:
    0
    Views:
    220
  5. gopal srinivasan
    Replies:
    0
    Views:
    235
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page