Blue Theme Orange Theme Green Theme Red Theme
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

What are benefits and Limitation of using Viewstate for state management?

 by Purushottam Rathore on May 19, 2009

Benefits and Limitation of Viewstate for state management
Comments: 0 Views: 7207 Printable Version 

There are the following benefits of using Viewstate:
  • No server resources are required because state is in a structure in
    the page code.
  • Simplicity.
  • States are retained automatically.
  • The values in view state are hashed, compressed, and encoded, thus representing a higher state of security than hidden fields.
  • View state is good for caching data in Web frame configurations because the
    data is cached on the client.

There are the following limitations of using Viewstate:-
  • Page loading and posting performance decreases when large values are
    stored because view state is stored in the page.
  • Although view state stores data in a hashed format, it can still be tampered
    because it is stored in a hidden field on the page. The information in the
    hidden field can also be seen if the page output source is viewed directly,
    creating a potential security risk.

For Example: Sample of storing values in view state.

ViewState["Time"] = DateTime.Now.ToString();
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Developer
Joined: Apr 19, 2007
Education: Masters Degree
 More Blogs from this Blogger
What are benefits and Limitation of using Viewstate for state management?
Image border Shadow using CSS
Gradient Background using Css
Seven Essential Steps of the project management for a Successful Initiation
View all »
 Latest Blogs
Initializing Compound Values
Deferred Query Evaluation
Extension Methods
Lambda Expressions and Expression Trees
Getting Started with Standard Query Operators
.NET Language-Integrated Query
Window Resizing
The Layout System in Silverlight
The Silverlight Plug-in Position and Dimensions
Colors and Brushes for Text Foreground
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 
6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.