|
INTERVIEW QUESTIONS
MICROSOFT
DOTNET
DETAILS
Question: What are the disadvantages of viewstate/what are the benefits
Answer: 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.
|
|
|
Category |
DotNet Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9608 users |
Added on |
5/31/2011 |
Views |
75401 |
Rate it! |
|
|
Question:
What are the disadvantages of viewstate/what are the benefits
Answer:
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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Describe session handling in a webfarm, how does it work and what are the limits
|
View Answer
|
|
How would you get ASP.NET running in Apache web servers - why would you even do this?
|
View Answer
|
|
Whats MSIL, and why should my developers need an appreciation of it if at all?
|
View Answer
|
|
In what order do the events of an ASPX page execute. As a developer is it important to understand these events?
|
View Answer
|
|
Which method do you invoke on the DataAdapter control to load your generated dataset with data?
|
View Answer
|
|
Can you edit data in the Repeater control?
|
View Answer
|
|
Which template must you provide, in order to display data in a Repeater control?
|
View Answer
|
|
How can you provide an alternating color scheme in a Repeater control?
|
View Answer
|
|
What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
|
View Answer
|
|
What base class do all Web Forms inherit from?
|
View Answer
|
|
What method do you use to explicitly kill a user session?
|
View Answer
|
|
Can you explain what inheritance is and an example of when you might use it?
|
View Answer
|
|
How do you turn off cookies for one page in your site?
|
View Answer
|
|
Which two properties are on every validation control?
|
View Answer
|
|
What tags do you need to add within the asp:datagrid tags to bind columns manually?
|
View Answer
|
|
How do you create a permanent cookie?
|
View Answer
|
|
What tag do you use to add a hyperlink column to the DataGrid?
|
View Answer
|
|
What is the standard you use to wrap up a call to a Web service
|
View Answer
|
|
Which method do you use to redirect the user to another page without performing a round trip to the client?
|
View Answer
|
|
What is the transport protocol you use to call a Web service SOAP
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All DotNet Interview Questions & Answers - Exam Mode /
Learning Mode
|