Pass viewstate to a new window in asp.net 2.0

G

Guest

I want to pop open a new window from my asp.net 2.0 web page. I want it to
pass or submit the current viewstate to the new window. Does anyone know how
to do that? Thanks.
 
T

Teemu Keiski

Hi,

by using cross-page posting (PostBackUrl on buttons etc) and changing form's
target to be a new window, that's quite near . Following from my previous
post to this group

"
Hi,

one way is to change form's target when posting

<asp:Button ID="Button1" OnClientClick="form1.target='_blank'"
runat="server" Text="Button" PostBackUrl="~/Default2.aspx" />

You just might also turn it back after posting, in case other buttons still
continue posting on the same page.
"
 
G

Guest

Hi lanem,

If you want to pass data to other pages, it's better to use Session, Cookie
rather than ViewState. ViewSate stores data in page hidden field, can not be
retrieved in other pages.

HTH

Elton Wang
 

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

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top