Even I disable the ViewState property, I still see the hidden field _VIEWSTATE

U

Umut Tezduyar

I want to get rid of the hidden field _VIEWSTATE.

I tried these:

I tried to disable ViewState property.
I tried to override Page's RegisterHiddenField method.
I tried to override Page's SavePageStateToPersistenceMedium.

None of them worked.

Any suggestions?
 
T

Teemu Keiski

Hi,

overriding SavePageStateToPersistenceMedium (and then equally
LoadPageStateFromPersistenceMedium) is the solution in ASP.NET 1.x. With
ASP.NET 2.0, you could just provide your own PageStatePersister class to
override the behaviour (or use the built.in SessionPageStatePersister class)

This article also gives some insight:
http://aspalliance.com/472
 
G

Guest

The _VIEWSTATE hidden field will always be there for an ASP.NET page, but if
you've diabled viewstate then its contents will be tiny and mostly empty,
only filled with minimal data that ASP.NET requires to function properly.
 
R

Ravi Ambros Wallau

Even on this case, __VIEWSTATE still exists as a hidden field...
You should not care about it...
 

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,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top