![]() ![]() Its stored in a hidden filed in hashed format (which I have discussed later) still it can be easily trapped.It can be performance overhead if we are going to store larger amount of data, because it is associated with page only.This are the main disadvantages of using View State: Enhanced security features ,like it can be encoded and compressed.This are the main advantage of using View State: As I give an Example to strore and retreive object in view state in the last of this article. Sometimes you may need to typecast ViewState Value to retreive. If you want to add one variable in View State, ASP.NET pages provide the ViewState property as a built-in structure for automatically storing values between multiple requests for the same page. It can store the page value at the time of post back (Sending and Receiving information from Server) of your page. View State is one of the most important and useful client side state management mechanism. Selection of client side and server side state management should be based on your requirements and the selection criteria that are already given. Server Side state management use server side resource for store data. There are two different types of state management:Ĭlient Side state management does not use any server resource, it store information using client side option. based on that you can choose the best approaches for manages state for your web application. So, when ever you start to think about state management, you should think about above criteria. Do you have a Web farm (multiple servers), a Web garden (multiple processes on one machine), or a single process that serves the application?.How long do you need to store the information?.Do you need to store information per user?.What are the capabilities of the browsers and devices that you are targeting?.What performance and bandwidth criteria do you have for your application?.Do you want to store the information on the client or on the server?.Does the client accept persistent or in-memory cookies?.How much information do you need to store?.There are some few selection criteria to selected proper way to maintain the state, as there are many way to do that. To overcome this problem ASP.NET 2.0 Provides some features like View State, Cookies, Session, Application objects etc. That is the reason to start concept of State Management. So it is a big issue to maintain the state of the page and information for a web application. As for example, if we enter a text and client on submit button, text does not appear after post back, only because of page is recreated on its round trip.Īs given in above pages, page is recreated before its comes to clients and happened for each and every request. As we all know HTTP is a stateless protocol, its can't holds the client information on page. It means a new instance of the web page class is re-created each time the page is posted to the server. In this article, I will cover the fundamentals of State Management and Details of View State. And I have organized the content in a way that it would be helpful to not only beginners also to advance user also. and I believe that should definitely helps to all the Beginners. Though all are very good article, still I have planned for write some article on state management. I have decided to write some articles on state management There are a few article on Code project on State Management, basically on Session, Caching, Cookies, etc. How to trace your view state information?įirst of all I want to thank Sean Ewington for his great initiative to write Beginner's Walk for Web Development article.
0 Comments
Leave a Reply. |