Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Please give your valuable suggestions&answers and

thanks for responses.
Posted
Updated 28-Aug-12 20:12pm
v2

View State is one of the most important and useful client side state management mechanism.

It can store the page value at the time of post back (Sending and Receiving information from Server) of your page.

ASP.NET pages provide the ViewState property as a built-in structure for automatically storing values between multiple requests for the same page.

View state data is encrypted and cannot be viewed with software like FireBug

Understanding ASP.NET View State[^]
Here you can get detailed description with how you can interpret (and protect) the data stored in View State.

Also refer:
An Introduction to View State[^]
 
Share this answer
 
Comments
Mohamed Mitwalli 29-Aug-12 3:11am    
5+ for explanation
Prasad_Kulkarni 29-Aug-12 5:01am    
Thank you Mohamed!
Manas Bhardwaj 30-Aug-12 14:12pm    
Very good +5!
Prasad_Kulkarni 30-Aug-12 23:55pm    
Thank you Manas!
Hi ,
ViewState it's hidden Fields in pages contains the states of those controls who enable ViewState ,also makes you save your data between postback that occur on the page .
You can use it when you want store the Data when postback occur
like this
C#
Viewstate.Add( "MyViewState", "test" );

when you want to retrieve the Data :
C#
if( Viewstate["MyViewState"]!=null)
{
   string MyData =  Viewstate["MyViewState"].ToString();
}

Check this links
Beginner's Guide To View State [^]
http://msdn.microsoft.com/en-us/library/ms972976.aspx[^]
http://msdn.microsoft.com/en-us/library/bb386448%28v=vs.100%29.aspx[^]
Best Regards
M.Mitwalli
 
Share this answer
 
Here: ViewState: Various ways to reduce performance overhead[^]

I see you asked various state management technique question here.
Doing this[^] would had helped a lot:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]
 
Share this answer
 
Please refer this link Click here[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900