468,140 Members | 1,469 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

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

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?
Feb 15 '06 #1
4 1753
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

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Umut Tezduyar" <um**@tezduyar.com> wrote in message
news:eo**************@TK2MSFTNGP09.phx.gbl...
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?

Feb 15 '06 #2
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/de...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/
===================================
"Umut Tezduyar" <um**@tezduyar.com> wrote in message news:eo**************@TK2MSFTNGP09.phx.gbl...
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?

Feb 15 '06 #3
Even on this case, __VIEWSTATE still exists as a hidden field...
You should not care about it...
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:ul****************@TK2MSFTNGP10.phx.gbl...
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

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Umut Tezduyar" <um**@tezduyar.com> wrote in message
news:eo**************@TK2MSFTNGP09.phx.gbl...
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?


Feb 15 '06 #4
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.

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"Umut Tezduyar" wrote:
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?

Feb 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ralph Soons | last post: by
2 posts views Thread by Janaka | last post: by
7 posts views Thread by et | last post: by
12 posts views Thread by Alan Silver | last post: by
7 posts views Thread by George Ter-Saakov | last post: by
6 posts views Thread by sri_san | last post: by
12 posts views Thread by Nick C | last post: by
6 posts views Thread by =?Utf-8?B?Unlhbg==?= | last post: by
4 posts views Thread by =?Utf-8?B?TUNN?= | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.