Results 1 to 2 of 2

Thread: Page_Load in server side code for Dialog

  1. #1

    Thread Starter
    Addicted Member BarankinBeAMan's Avatar
    Join Date
    Aug 2002
    Location
    Reston,Va
    Posts
    164

    Page_Load in server side code for Dialog

    I open modal dialog window from main.

    Page_Load in dialog window will get triggered only once for the wholw session.

    I mean, even I close dialog window, the server code will not get triggered next time I open dialog again.

    What is the problem??

    Thank you all !

  2. #2

    Thread Starter
    Addicted Member BarankinBeAMan's Avatar
    Join Date
    Aug 2002
    Location
    Reston,Va
    Posts
    164

    resolved Re: Page_Load in server side code for Dialog

    Synopsis:
    When opening a page as a modal window using showmodaldialog the pageload event will not fire if the page has previously opened from the window. This appears to be a problem with the caching. You must add code to prevent this in the page load event.

    The Code:
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Response.Expires = 0
    Response.Cache.SetNoStore()
    Response.AppendHeader("Pragma", "no-cache")
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width