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

enableviewstate=false, still viewstate information is added

Hi

Even though the Viewstate has been disabled, ASP.NET
still uses about twenty bytes for Viewstate.

Not only can you disable Viewstate at the page level, but
you can also disable Viewstate at the control level. For
example, the following code disables Viewstate for a
ListBox control:
<asp:listbox EnableViewState="false" id="ListBox1"
runat="server" Rows="10"></asp:listbox>

You can also disable Viewstate for the entire application
in the web.config file:
<configuration>
<system.web>
<pages buffer="true"
EnableViewState="true" />
</system.web>
</configuration>

HTH
Ravikanth

-----Original Message-----
Hello.

I'm adding some controls at runtime, and I've set enableviewstate=false inmy aspx page.
Still, it adds viewstate information for my page. This seems only to applywhen I'm adding a checkboxlist, allthough I'm not sure that this is thecase. I've even tried setting enableviewstate=false for the controls.I really don't need this extra information, and I can't understand why it'sbeeing added, because I've set the viewstate to false..
C.H
.

Nov 17 '05 #1
1 4029
Hmm...I've added that information to my web.config file, still I get this
much viewstate information:

<input type="hidden" name="__VIEWSTATE" value="dDwxMDAzNDU0NTMwOztsPHJlcFF1
aXpRdWVzdGlvbjpfY3RsMTc6cXVlc3Rpb25fODow
O3JlcFF1aXpRdWVzdGlvbjpfY3RsMTc6cXVlc3Rpb
25fODoxO3JlcFF1aXpRdWVzdGlvbjpfY3RsMTc6cX
Vlc3Rpb25fODoyO3JlcFF1aXpRdWVzdGlvbjpfY3Rs
MTc6cXVlc3Rpb25fODozO3JlcFF1aXpRdWVzdGlvbj
pfY3RsMTc6cXVlc3Rpb25fODozO3JlcFF1aXpRdWVz
dGlvbjpfY3RsMTk6cXVlc3Rpb25fOTowO3JlcFF1aXpR
dWVzdGlvbjpfY3RsMTk6cXVlc3Rpb25fOToxO3JlcFF1a
XpRdWVzdGlvbjpfY3RsMTk6cXVlc3Rpb25fOToyO3JlcFF1
aXpRdWVzdGlvbjpfY3RsMTk6cXVlc3Rpb25fOTozO3JlcFF1
aXpRdWVzdGlvbjpfY3RsMTk6cXVlc3Rpb25fOTozO3JlcFF1
aXpRdWVzdGlvbjpfY3RsMjE6cXVlc3Rpb25fMTA6MDtyZX
BRdWl6UXVlc3Rpb246X2N0bDIxOnF1ZXN0aW9uXzEwOjE
7cmVwUXVpelF1ZXN0aW9uOl9jdGwyMTpxdWVzdGlvbl8xMD
oyO3JlcFF1aXpRdWVzdGlvbjpfY3RsMjE6cXVlc3Rpb25fMTA6
MztyZXBRdWl6UXVlc3Rpb246X2N0bDIxOnF1ZXN0aW9uXzEw
OjQ7cmVwUXVpelF1ZXN0aW9uOl9jdGwyMTpxdWVzdGlvbl8xM
Do0Oz4+W/Gaa6CwxccKDvHCVnbf0yLMFJU=" />
That seems as an awful lot of information! It only happens when I use
checkboxlist
Regards C.H
Nov 17 '05 #2

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

Similar topics

0
by: Dave Verwer | last post by:
Hi I have a problem which is easily reproducable using VS.NET 2003 and the .Net framework 1.1 (not tested with framework 1.0) regarding disabling ViewState for dynamically created controls. ...
1
by: Ravikanth[MVP] | last post by:
Hi Even though the Viewstate has been disabled, ASP.NET still uses about twenty bytes for Viewstate. Not only can you disable Viewstate at the page level, but you can also disable Viewstate...
5
by: JollyK | last post by:
Hello all, I have always been having this issue and wondering what the solution is. When I set the enableviewstate property to false for a textbox, the textbox always retains its value after a...
4
by: Bruce Chao | last post by:
I tried to turn off viewstate and so I added enableViewState=false in side the Page directive, rebuild the page, test it. - not working Then I set all controls on the page so all their...
7
by: Brian Henry | last post by:
Hi, I want EnableViewState = false turned on to optimize the end output page (it was over 600KB with it on) but when i turn it off, our pageing functionality no longer works mainly the...
2
by: michele | last post by:
Hi, i'm using a datagrid control in my webform, with AutoGenerateColumns=false; it work very well if EnableViewState=true; including paging and sorting, but this cause a big performance issue, so...
6
by: Chris | last post by:
I've created two textboxes and one button on my web form. I then set the EnableViewState property of Textbox1 to False. Textbox2 is set to True. The button has no code in it - It simply has an...
2
by: teo | last post by:
I have a Listbox, if I set EnableViewStarte = False the AutopostaBack fired by SelectedIndexChanged doesn't work. The 'SelectedIndexChanged' event should call
1
by: =?Utf-8?B?VmlkZHM=?= | last post by:
Hi All, I am not able to get the sort event when i EnableViewState =false for data grid. Is there any relation betwn those two.Please comment. How can I get through this problem? Thanks in...
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:
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...

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.