473,396 Members | 1,748 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,396 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 4034
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: 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:
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
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.