ViewState Collection

  • Thread starter Thread starter SouthSpawn
  • Start date Start date
S

SouthSpawn

Hello,

Let's say I am creating a class library project.
This class that I am creating will work for a windows form project and
also a asp.net project.

How can I store something in the "ViewState" collection in a class library
project?

Thanks,
Mark
 
You have to check to see if you are in a web context. You can do that my
calling

if( HttpContext.Current != null ){
// set viewstate.
}
 

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

Back
Top