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?
Teemu Keiski - 15 Feb 2006 19:56 GMT
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

Signature
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
>I want to get rid of the hidden field _VIEWSTATE.
>
[quoted text clipped - 7 lines]
>
> Any suggestions?
Ravi Ambros Wallau - 15 Feb 2006 20:34 GMT
Even on this case, __VIEWSTATE still exists as a hidden field...
You should not care about it...
> Hi,
>
[quoted text clipped - 18 lines]
>>
>> Any suggestions?
Juan T. Llibre - 15 Feb 2006 20:04 GMT
You will *still* have a minimal ViewState property,
representing the page itself, even if you turn off the view state
on each and every control and even if you disable it completely.
See :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/a
sp11222001.asp
and
http://www.aspnetresources.com/articles/ViewState.aspx
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
>I want to get rid of the hidden field _VIEWSTATE.
>
[quoted text clipped - 7 lines]
>
> Any suggestions?
Steve C. Orr - 15 Feb 2006 20:31 GMT
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.

Signature
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net
> I want to get rid of the hidden field _VIEWSTATE.
>
[quoted text clipped - 7 lines]
>
> Any suggestions?