enableviewstate=false, still viewstate information is added

  • Thread starter Thread starter Ravikanth[MVP]
  • Start date Start date
R

Ravikanth[MVP]

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
 
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
 
Back
Top