473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1865
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ralph Soons | last post by:
Hi all, I am trying to save the viewstate in a session instead of storing it in a hidden of the webpage which is default. This because of performance reasons. When I use line 2 in combination...
2
by: Janaka | last post by:
We have managed to lock down 99% of the application errors occurring in our asp.net sites. The only errors which occur on a regular basis now are viewstate errors. We have disabled viewstate on...
7
by: et | last post by:
I'm not sure I understand the use of the ViewState. Do I understand correctly that values of controls are automatically held in a hidden control called ViewState? If so, then why can't we get...
12
by: Alan Silver | last post by:
Hello, I have a page that gets passed an ID in the query string. It then uses this ID to pull info out of a database and populate controls on the page. When the page is posted back, the query...
7
by: George Ter-Saakov | last post by:
on my page I have <%@ Page Language="C#" EnableViewState="false"%> But in HTML i still see __VIEWSTATE hidden variable. <form name="form1" method="post" action="......" id="form1"> <div>...
6
by: sri_san | last post by:
Hello, I have a aspx page in which I would like to eliminate all of the hidden variables as this page would be imported to an email client and the hidden controls are usually rendered in the mail...
12
by: Nick C | last post by:
Hi How can i reduce the viewstate for my asp.net application. It is getting very large now. What is a good solution? thanks N
6
by: =?Utf-8?B?Unlhbg==?= | last post by:
Hi, I found out that Text property is perserved, but disable/enable status is not preserved, especially I change this setting of a server side text box with client side javascipt and then post...
4
by: =?Utf-8?B?TUNN?= | last post by:
I am trying to disable ViewState at the application level. I have the following line in my web.config: <pages enableViewState="false"></pages> But it is not working. What can I do?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.