Advantages of Using View State
• It is easy to implement.
• Enhanced security features. The values in view state are hashed, compressed, and encoded for Unicode implementations.
• It retains page and control state for us automatically.
• It does not use server resources since all of the state information is contained within the page itself.
• On ordinary Web Forms pages, their view state is sent by the server as a hidden variable in a form, as part of every response to the client, and is returned to the server by the client as part of a post back. However, to reduce bandwidth demand, ASP.NET does not send a page’s view state to the client. Instead, the view state is saved as part of a user’s session on the server. Where there is a view state, a hidden field that identifies this page’s view state is sent by the server as part of every response to the client, and is returned to the server by the client as part of the next request.
Disadvantages of Using View State
• Page security can be a problem when using View State Performance. The view state is stored in the page itself, so increase the page size
• The view state is stored in a hidden field on the page. Although view state stores data in a hashed format and the View State data is available in the page source and, even though it is encrypted, it can be tampered with and be mutilated.
• Scope is limited to only single page.
• Because the view state for a given page must be kept on the server, if the user uses the Back feature on the browser to go back in the history, it is possible for the current state to be out of synchronization with the current page of the browser
• It is easy to implement.
• Enhanced security features. The values in view state are hashed, compressed, and encoded for Unicode implementations.
• It retains page and control state for us automatically.
• It does not use server resources since all of the state information is contained within the page itself.
• On ordinary Web Forms pages, their view state is sent by the server as a hidden variable in a form, as part of every response to the client, and is returned to the server by the client as part of a post back. However, to reduce bandwidth demand, ASP.NET does not send a page’s view state to the client. Instead, the view state is saved as part of a user’s session on the server. Where there is a view state, a hidden field that identifies this page’s view state is sent by the server as part of every response to the client, and is returned to the server by the client as part of the next request.
Disadvantages of Using View State
• Page security can be a problem when using View State Performance. The view state is stored in the page itself, so increase the page size
• The view state is stored in a hidden field on the page. Although view state stores data in a hashed format and the View State data is available in the page source and, even though it is encrypted, it can be tampered with and be mutilated.
• Scope is limited to only single page.
• Because the view state for a given page must be kept on the server, if the user uses the Back feature on the browser to go back in the history, it is possible for the current state to be out of synchronization with the current page of the browser