What are the disadvantages of view state / what are the
benefits?

Answer Posted / sreyasmn

Advantages:
- No server resources required
- simple implementation
- automatic retention of page and control state
- Enhanced security features. The values in view state are
hashed, compressed, and encoded for Unicode implementations.

Disadvantages - Because the view state for a given page
must be kept on the server, it is possible for the current
state to be out of synchronization with the current page of
the browser, if the user uses the Back feature on the
browser to go back in the history.For example, suppose the
user goes to Page 1, then clicks a button to go to Page 2,
then presses Back to return to Page 1. The current page on
the browser is now Page 1, but the current state on the
server is that of Page 2. Advantages - 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 postback. However, to reduce bandwidth demand when
using mobile controls, 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.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is react a template engine?

519


what is publisher?

1648


Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal

1371


Write a code for sending an email from asp.net application.

538


Can we create a multiple user simultaneously ?

584






Explain Session state management options in ASP.NET.

588


Explain what are webservices?

541


How can you ensure a permanent cookie?

549


What is the difference between file-based dependency and key-based dependency?

564


Why is global asax is used?

608


What are the benefits of view state?

546


How do you initiate validation on the server manually? What are two situations when you might you want to do that?

1359


Can you explain composite pattern?

590


Where the assembly is stored in asp.net?

550


What is asp.net version?

528