Solved

Pass ViewState to other pages

Posted on 2008-10-20
2
539 Views
Last Modified: 2012-08-13
Is there a way to pass the ViewState of the current pages to the next page? I so can someone provide me some reading material on this please...

Nugs
0
Comment
Question by:Nugs
2 Comments
 
LVL 6

Accepted Solution

by:
AmarIs26 earned 250 total points
ID: 22758990
You cannot pass viewstate to another page however you can pass form variables/control values which the viewstate contains to other pages using Server.Transfer(url,true) method.
http://msdn.microsoft.com/en-us/library/ms972976.aspx
http://msdn.microsoft.com/en-us/library/bb386448.aspx
http://www.beansoftware.com/ASP.NET-Tutorials/ViewState-In-ASP.NET.aspx
 
0
 
LVL 22

Assisted Solution

by:prairiedog
prairiedog earned 250 total points
ID: 22759312
The ViewSate's scope is within the current page, so when another page is loaded, the ViewState of the previous page will be destroyed. If you need to pass some value of the current page to the next page, then the simplest way is to use either QueryString or Session.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now