EnableViewState

  • Thread starter Thread starter Sudha Pune
  • Start date Start date
S

Sudha Pune

Hi Techies

A small(silly) doubt, EnableViewStateis to maintain the viewstate
across the server round trips, but even if i set EnableViewStateto
false still it is maintaining the values after posting back.... why...

Just i tried with a textbox and i set EnableViewState = false and i
have a button and on click of button, i thought the value will not be
there, but it is there...

Where is my understanding going wrong or what is wrong....
 
By design, field values are always posted to the server (this is how a web
form works) so server side the value is always known (and likely restored by
ASP.NET as you can see).

The viewstate is an addition to store other properties (colors etc....) that
are not handled by HTML forms...
 
Thanks, and it is correct, in web form the values will be posted to
server always.

But what i understood is, in the next render, the textbox value(text)
will be empty since i set the EnableViewState = false. But it is not

So still i do not find any difference b/w EnableViewState = false /
True.

More explaination please.....
 
Back
Top