Click here to Skip to main content
13,548,607 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all

Is there any view state in Windows application???

Actually i want the controls present in a panel before reinitialize the panel.
In my project i have create a panel in every 10 second dynamically.
So i wrote that
Panel pnlTest = new Panel();

in the tick event.
After every 10 second the panels controls disappear because the panel is initializing after every 10 second.

But i want the that panel's controls.

So want a View state type thing .

Please suggest

Thanks In advance.
Posted 18-Apr-12 20:38pm
Updated 18-Apr-12 20:45pm
SAKryukov 19-Apr-12 3:00am
Why? why?!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

What an abuse and nonsense! Is it so hard to understand that the View State is the artifact of quite unusual situation with Web applications, due to the stateless nature of HTTP protocol?
Please see:[^],[^].

For "normal" application thinking of a View State is nearly the same, as re-loading the whole UI desktop application on every control click (or every 10 seconds :-)) and then restoring the whole state of the state machine. For a normal desktop application developer, it would sound totally wild, but this is what actually happens with Web applications (if we forget about client-side scripting and Ajax for a moment). Applying the same thinking to desktop application is something which… well, I don't even know what to advise, perhaps starting to learn programming from the very beginning.

At the same time, saving and restoring of the status of the application when the whole application is closed and then started again is a really good thing, but this is a very different story. In all cases, you should forget the idea of View State as a nightmare, when it comes to desktop applications. However, everything can happen to a person who wish to overwhelm the application with panels so quickly. Don't even bother to explain why… :-)

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

bhagirathimfs 19-Apr-12 2:50am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180515.1 | Last Updated 19 Apr 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100