Whats easiest way to pass viewstate data into a popup dialog

Discussion in 'ASP .Net' started by desmcc@gmail.com, Oct 18, 2005.

  1. Guest

    I am launching a popup screen in Javascript using
    window.ShowmodalDialog. Is there any easy way I can pass viewstate data
    (which is a class containing various members) into the popup. I also
    need to be able to pass the data back out of the popup so that the
    viewstate of the original page gets updated.

    thanks for the help,
    Des.
     
    , Oct 18, 2005
    #1
    1. Advertisements

  2. Guest

    If I need to put ViewState - or any kind of .NET variable in a
    JavaScript function - I write the function from the code behind page to
    include the variables I need, like so:

    Dim JS As String = "<script language='JavaScript'>alert('" &
    ViewState("SomeVar") & "';</script>"
    Me.RegisterStartupScript("onload",JS)

    Not sure if that will help or not.

    Scott
     
    , Oct 18, 2005
    #2
    1. Advertisements

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. Tom
    Replies:
    0
    Views:
    481
  2. garv mehta
    Replies:
    0
    Views:
    605
    garv mehta
    Jul 14, 2004
  3. flamesrock
    Replies:
    3
    Views:
    761
    gene tani
    Jun 7, 2005
  4. mark | r
    Replies:
    1
    Views:
    251
    Hannibal
    Oct 7, 2003
  5. Replies:
    4
    Views:
    190
    Kyle Peterson
    Dec 15, 2005
  6. Rajesh
    Replies:
    0
    Views:
    782
    Rajesh
    Jul 31, 2007
  7. Jens Peter Hansen
    Replies:
    7
    Views:
    849
    Randy Webb
    Jun 19, 2004
  8. francisco lopez
    Replies:
    2
    Views:
    279
    Dr John Stockton
    Dec 31, 2004
Loading...