Whats easiest way to pass viewstate data into a popup dialog

D

desmcc

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

ScottStoecker

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top