Like in asp.net you save items in viewState, is there similar function with windows form?

Recommended Answers

All 2 Replies

No, why would there be? Pages are destroyed in ASP.NET applications after the server renders the page. Object states are stored in the viewstate so on a postback the page can be recreated. Now with windows forms the objects are never destroyed until you destroy them. What do you need a viewstate for? Save the form's state or don't destroy it.

Thanks Scott, I was trying to save the form's state and call the value from another class.
As a work around, I just place all the methods in the form class

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.