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

Disabling ViewState Throughout

I want to disable ViewState for all pages associated with a given MasterPage.
How do I do this? I've tried doing...

<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="StdMaster.master.cs"
EnableViewState="false"
Inherits="StdMaster" %>

but I still see ViewState hidden tages in my pages
Dec 31 '06 #1
2 901
Even if you set it to false, a viewstate control will be added if your page
has a server side form (ie, <form runat="server">). To be honnest, I'm not
sure why that is and what information is added to the viewstate, i just know
it's true :)

The page's SavePageStateToPersistenceMedium and
LoadPageStateFromPersistenceMedium methods might be the only way you have to
completely eliminate the viewstate...

Karl

--
http://www.openmymind.net/
http://www.codebetter.com/
"Alex Maghen" <Al********@newsgroup.nospamwrote in message
news:81**********************************@microsof t.com...
>I want to disable ViewState for all pages associated with a given
MasterPage.
How do I do this? I've tried doing...

<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="StdMaster.master.cs"
EnableViewState="false"
Inherits="StdMaster" %>

but I still see ViewState hidden tages in my pages
Jan 1 '07 #2
Karl Seguin wrote:
Even if you set it to false, a viewstate control will be added if your
page has a server side form (ie, <form runat="server">). To be honnest,
I'm not sure why that is and what information is added to the viewstate,
i just know it's true :)

The page's SavePageStateToPersistenceMedium and
LoadPageStateFromPersistenceMedium methods might be the only way you
have to completely eliminate the viewstate...

Karl
The only way I know is to use a httphandler and remove it from the
output, easy to do if your rendering xhtml. This is one of those
annoying .net things that would be easy to change if we could change the
framework source code and compile it as needed.
Jan 1 '07 #3

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

Similar topics

9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
0
by: Mark Rodseth | last post by:
Hi Is it possible to disable viewstate on a repeater control and still raise an OnItemCommand event? All I want to do is click a button on one of the repeater items, raise and event and capture...
1
by: Jason Galvin | last post by:
I would like to disable the auto-populating feature (remembers form element text between post-backs) when creating a .NET form. I have succeeded in disabling auto-populate by creating my controls...
7
by: Mike | last post by:
Hi, I have an ASP.NET solution in which I need to store some information, such as DB user and password. So far, I have used the Context object to share information between the various pages, but I...
6
by: sonic | last post by:
Hi, I am experimenting with different viewstate management ideas for large datagrids, and found a microsoft suggestion to turn it off, and only store relevant information by manually accessing...
5
by: Por Belmstedt | last post by:
How do I disable postback repopulation of non-viewstate controls, such as normal textboxes etc? (Surely there must be a more elegant solution than manually clearing them on page load...)
3
by: swesorick | last post by:
I would like 95% of my site to have the viewstate disabled, in order to reduce the size of my pages. However, there are about 5% of the pages on my site that will require viewstate. Is there...
1
by: JJ | last post by:
Is there way in webconfig to disable viewstate for all aspx files in a certain folder? I know there is a way to do that for the whole application and i am wondering same concept is available for...
1
by: PJ6 | last post by:
Apparently ASP.NET completely ignores base.EnableViewState = false. Overriding SaveViewState does nothing, and I get an exception if I override LoadViewState. OK, I give up. How do I make a control...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.