473,387 Members | 1,579 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,387 software developers and data experts.

possible to remove Viewstate hidden field?

Is it possible to prevent the <input type="hidden"
name="__VIEWSTATE" field from being generated in an aspx page?

I'm running off Framework 1.1

The field is messing up a process that I need to run, so simply clearing
out the viewstate by overriding SavePageStateToPersistenceMedium, etc
isn't enough

Thanks in advance!
--

fiddlewidawiddum
Sep 10 '06 #1
3 2615
You can disable it at the page level (via the properties window or the page
directives line in the .aspx file), but that won't completely get rid of the
field. A minimum viewstate field will always be present. It should,
however, prevent the load and save viewstate methods from running.
"Stimp" <re*@spumco.comwrote in message
news:sl****************@murphy.redbrick.dcu.ie...
Is it possible to prevent the <input type="hidden"
name="__VIEWSTATE" field from being generated in an aspx page?

I'm running off Framework 1.1

The field is messing up a process that I need to run, so simply clearing
out the viewstate by overriding SavePageStateToPersistenceMedium, etc
isn't enough

Thanks in advance!
--

fiddlewidawiddum

Sep 10 '06 #2
On Sun, 10 Sep 2006 Scott M. <s-***@nospam.nospamwrote:
You can disable it at the page level (via the properties window or the page
directives line in the .aspx file), but that won't completely get rid of the
field. A minimum viewstate field will always be present. It should,
however, prevent the load and save viewstate methods from running.
I read on the net that it's possible to prevent the <inputfield being
generated by not inheriting from the 'Page' class .. but it neglects to
mention what I should inherit from instead.

Any ideas?

cheers
--

fiddlewidawiddum
Sep 10 '06 #3
Well, if you don't inherit from the page class, you are going to lose
virtually all the other benefits and characteristics of a Web Form.
ViewState is part of the fundamental architecture of ASP.NET. If you
absolutely can't make your application work because of it, ASP.NET may not
be the platform for you.
"Stimp" <re*@spumco.comwrote in message
news:sl****************@murphy.redbrick.dcu.ie...
On Sun, 10 Sep 2006 Scott M. <s-***@nospam.nospamwrote:
>You can disable it at the page level (via the properties window or the
page
directives line in the .aspx file), but that won't completely get rid of
the
field. A minimum viewstate field will always be present. It should,
however, prevent the load and save viewstate methods from running.

I read on the net that it's possible to prevent the <inputfield being
generated by not inheriting from the 'Page' class .. but it neglects to
mention what I should inherit from instead.

Any ideas?

cheers
--

fiddlewidawiddum

Sep 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul | last post by:
Hi I am setting a boolean value to true on a page and writing the results to viewstate Just above the web form designer generated code I have Dim bps_found As Boolean 'visible to this module in...
2
by: Fred Newton | last post by:
Just wondering if there are any strong arguments one way or the other for storing a small value (6 bytes) in the ViewState vs. Session state. The value is needed in only one page in a large ASP.NET...
3
by: Kevin Gorski | last post by:
This question has been asked before, but there have been no definitive answers that I was able to find. Can the viewstate hidden input field be moved to a less prominent page location? On an...
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...
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...
2
by: rgrandidier | last post by:
I have a hidden element I add to the form each time dynamically, however, it seems that when I do a submit and change the hidden element value from 1 to 2, it displays it as 1 on the form even...
6
by: mosscliffe | last post by:
I am testing for how/when a page is posted back and I decided to use a ViewState variable in PageLoad to set up a counter, but it appears, the ViewState is cleared on each PageLoad. So then I used...
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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.