p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# (http://p2p.wrox.com/forumdisplay.php?f=22)
-   -   ViewState (http://p2p.wrox.com/showthread.php?t=35626)

Wervis November 30th, 2005 09:44 AM

ViewState
 
Hi,

Is it possible to read the Page.ViewState in a custom control. I tried
Code:

this.Page.ViewState["variable"]
but received an error. Anyone?


planoie December 3rd, 2005 11:35 AM

You can read what you put into the viewstate. If you don't put anything INTO viewstate, you can't get anything out of it, even though it contains information. Other controls on the page place information into the viewstate, but you can't access it. Presumably, the viewstate is managed in such a way that only the control that populated the value can get at the value.

-Peter


All times are GMT -4. The time now is 09:10 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.