Click here to Skip to main content
16,016,140 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, this is my interview question, if we click the button in asp.net2.0, how the server identifies the button's state changed in the viewstate, Any function or some other things doing this process of Server checking the state of each and every contol to identifie changes. please help me as soon as possible, coming wednesday i have the final round
Posted

Hi karthime,

Hope you were aware of view state property and its uses.

Try to find solution from these points.

1.values can be accessed after the PreInit event for the page and before the PreRender event of the page.
2.Viewstate can be altered for all the pages in a web application using web.config file <pages buffer="true">
<configuration>
<system.web>
<pages buffer="true">
enableViewState="true" />
</pages></system.web>
 
Share this answer
 
The server uses ViewState to track the state of various controls. Viewstate is what retains the values between page visits. If we change the value of any control then postedbacked value is checked with saved viewstate to determine that the value is changed or not.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900