EnableViewState

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....
 
P

Patrice

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...
 
S

Sudha Pune

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.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top