Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Pass ViewState to other pages

Posted on 2008-10-20
2
542 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

840 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