Ask a Question related to ASP.NET General, Design and Development.
-
Ravikanth[MVP] #1
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
enableviewstate=false in>-----Original Message-----
>Hello.
>
>I'm adding some controls at runtime, and I've setseems only to apply>my aspx page.
>Still, it adds viewstate information for my page. Thisthat this is the>when I'm adding a checkboxlist, allthough I'm not surethe controls.>case. I've even tried setting enableviewstate=false forunderstand why it's>I really don't need this extra information, and I can't>beeing added, because I've set the viewstate to false..
>
>
>C.H
>
>
>.
>Ravikanth[MVP] Guest
-
enableviewstate=false cause datagrid to disappear
For sorting to work we need to enable viewstate for datagrid. But to avoid excessive load on client machine because of viewstate . You can disable... -
Using Datagrid with EnableViewState="false" gets wrong DataKeys value
I have created a datagrid with search text boxes on the page that allow the user to filter the list. If I use view state, as in the Example 1,... -
EnableViewState = false not working
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... -
Newbie question on Viewstate information
Hi All, I am new to ASP.NET . I have developed an sample application . My problem is that all webpages are very very slow.. and when i see... -
Storing page information / viewstate between pages
Thanks for the reply. Eventually I ended up using a serializable class, which holds the entered data, and is stored in the session when the user... -
Christian H #2
added enableviewstate=false in web.config - still no luck.
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
Christian H Guest
-
sultan zahir khan #3
enableviewstate=false, still viewstate information is added
check the default viewstate settings of these controls
sultan zahir khan Guest
-
Christian H #4
controls have enableViewState=false, still viewstate info is added
Well, they are enabled by default, but I've set the enableViewState=false on
all of my controls.
This is really a mystery to me..
CH
Christian H Guest
-
Joao S Cardoso [MVP] #5
Re: controls have enableViewState=false, still viewstate info is added
You will notice that the viewstate gets smaller as you put controls with
enableviewstate = false.
Mind that the page itself also as viewstate.
Also, if you are not using viewstate whatsoever... perhaps would be better to
use HTML controls instead of WebControls.
regards
Joao Cardoso (MVP dotNET)
================================================== =====
[LusoCoders]- [url]http://groups.yahoo.com/group/lusocoders/[/url]
[PontoNetPT]- [url]http://www.programando.net/regras.aspx[/url]
[email]jjscc@acinet.pt.nosp[/email]am - [url]www.acinet.pt[/url]
================================================== =====
Joao S Cardoso [MVP] Guest



Reply With Quote

