Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 Forms WinForm
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 21:38pm
Edited 18-Apr-12 21:45pm
sravani.v15.7K
v2
Comments
SAKryukov at 19-Apr-12 3:00am
   
Why? why?!
--SA
Rate this: bad
good
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:
http://en.wikipedia.org/wiki/View_State#State_management[^],
http://msdn.microsoft.com/en-us/library/ms972976.aspx[^].
 
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 Smile | :) ) 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… Smile | :)
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
bhagirathimfs at 19-Apr-12 2:50am
   
Thanks

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

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 300
2 Sergey Alexandrovich Kryukov 289
3 CPallini 235
4 Maciej Los 215
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 19 Apr 2012
Copyright © CodeProject, 1999-2014
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