473,788 Members | 2,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:
<configuratio n>
<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 4069
Hmm...I've added that information to my web.config file, still I get this
much viewstate information:

<input type="hidden" name="__VIEWSTA TE" value="dDwxMDAz NDU0NTMwOztsPHJ lcFF1
aXpRdWVzdGlvbjp fY3RsMTc6cXVlc3 Rpb25fODow
O3JlcFF1aXpRdWV zdGlvbjpfY3RsMT c6cXVlc3Rpb
25fODoxO3JlcFF1 aXpRdWVzdGlvbjp fY3RsMTc6cX
Vlc3Rpb25fODoyO 3JlcFF1aXpRdWVz dGlvbjpfY3Rs
MTc6cXVlc3Rpb25 fODozO3JlcFF1aX pRdWVzdGlvbj
pfY3RsMTc6cXVlc 3Rpb25fODozO3Jl cFF1aXpRdWVz
dGlvbjpfY3RsMTk 6cXVlc3Rpb25fOT owO3JlcFF1aXpR
dWVzdGlvbjpfY3R sMTk6cXVlc3Rpb2 5fOToxO3JlcFF1a
XpRdWVzdGlvbjpf Y3RsMTk6cXVlc3R pb25fOToyO3JlcF F1
aXpRdWVzdGlvbjp fY3RsMTk6cXVlc3 Rpb25fOTozO3Jlc FF1
aXpRdWVzdGlvbjp fY3RsMTk6cXVlc3 Rpb25fOTozO3Jlc FF1
aXpRdWVzdGlvbjp fY3RsMjE6cXVlc3 Rpb25fMTA6MDtyZ X
BRdWl6UXVlc3Rpb 246X2N0bDIxOnF1 ZXN0aW9uXzEwOjE
7cmVwUXVpelF1ZX N0aW9uOl9jdGwyM TpxdWVzdGlvbl8x MD
oyO3JlcFF1aXpRd WVzdGlvbjpfY3Rs MjE6cXVlc3Rpb25 fMTA6
MztyZXBRdWl6UXV lc3Rpb246X2N0bD IxOnF1ZXN0aW9uX zEw
OjQ7cmVwUXVpelF 1ZXN0aW9uOl9jdG wyMTpxdWVzdGlvb l8xM
Do0Oz4+W/Gaa6CwxccKDvHCV nbf0yLMFJU=" />
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
4059
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. Basically setting EnableViewState=false on controls created dynamically does not stop the viewstate being stored! I have tried this at the control level (setting EnableViewState = false for every control), at the Page level with the @ Page...
1
1127
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 at the control level. For example, the following code disables Viewstate for a ListBox control:
5
14776
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 postback occurs. Why is this? I want the textbox to become empty after postback. How can I do it without setting textbox.text = "" and without doing Response.redirect to the same page. JK
4
3127
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 enableViewState is also false -- still, not working. After doing al these, I still see the hidden viewstate variable in the HTML source. Please help!!!!!!!! Thanks!
7
2110
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 PageIndexChanged event no longer fires, how do you handle this with enable view state as false? thanks!
2
1982
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 i've decided to set EnableViewState=false: now the events related to the datagrid have some strange behavours: for example the PageIndexChangedEvent is not correcty raised (when i go from page 1 to 4 works, if i want to return to page 1, the event...
6
1935
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 auto post back which reloads the page. I run the web application and type "test 1" into Textbox1 and "test 2" into Textbox2. I click the button and the page reloads. Textbox1 has the value of "test 1". Textbox2 has the value of "test 2". Am...
2
2916
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
2064
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 advance. Regards,
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.