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. Advertising

  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. 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. Tom
    Replies:
    0
    Views:
    428
  2. garv mehta
    Replies:
    0
    Views:
    482
    garv mehta
    Jul 14, 2004
  3. flamesrock
    Replies:
    3
    Views:
    652
    gene tani
    Jun 7, 2005
  4. Rajesh
    Replies:
    0
    Views:
    626
    Rajesh
    Jul 31, 2007
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    596
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page