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
What is the purpose of session management?
Define a multilingual website?
What are the different types of cookies in asp.net?
How can i explain my project during interview?many time i expalain my project but they did't accept? please explain me.
How do u deploy your asp.net application?
What is aspect-oriented programming?
What are the steps to follow to host a web application on a web server?
What is the syntax for datagrid and specifying columns?
Explain what is event bubbling?
What is the part of url?
Give an example of what might be best suited to place in the application_start and session_start subroutines?
What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
Define a static class?
How does a content page differ from a master page?
How can you handle unmanaged code exceptions in asp.net?