Solved

Pass ViewState to other pages

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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