WebCustomControl ViewState

C

Cristian

Hi,
I'm building a WebCustomControl, the principal class which inherits from
WebControl has the property ViewState, and I want to access to the ViewState
from other classes in my project, but I can't do it. Somebody konw how can I
do that?

Thanks
 
G

Guest

Cristian,

Try creating a public static object of type StateBag that points to the
ViewState object on the page. ViewState isn't the actual type, it is of type
StateBag. You should be able to reference this object from other classes at
that point.

Thanks,
Ian Suttle
http://www.IanSuttle.com
http://www.NewsFuel.com - Aggregated Technology News
 

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

Top