title: What's the purpose to use Viewstate in asp. net
body: <p>It is being said that Viewstate is used to retain state between request, but let's have a scenario like this:
  I have a textbox starts with 0,  and a button to increment +1. Below are steps:</p>
  
  <ol>
  <li><p>Initially it was a get request to get the page, so the text in the textbox is 0.</p></li>
  <li><p>I clicked the button, the value 0 was being postback to the server.</p></li>
  <li><p>The method in the event handler on the server  increment the value by 1, then value one is sent to my browser.</p></li>
  <li><p>Now the 1 was  being displayed in the textbox on my browser, and I clicked the button again, 1 is sent to the server again</p></li>
  <li><p>Same as step 3, and then  I will have 2 displayed in the textbox.</p></li>
  </ol>
  
  <p>As you can see, I don't need to use Viewstate to "remember" values in previous request, I know textbox in asp.net will use Viewstate by default even though enableviewstate is set to be false, so just ignore that, whatz the purpose of using viewstate in my example?</p>