HighTechTalks DotNet Forums  

__VIEWSTATE data HUGE!!!

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss __VIEWSTATE data HUGE!!! in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Shabam
 
Posts: n/a

Default __VIEWSTATE data HUGE!!! - 09-24-2004 , 10:59 AM






I have an application being developed and I've noticed that in most of the
pages the __VIEWSTATE data is HUGE, about 4 pages full in many cases. This
leads to bloated page sizes upwards of 50KB and more.

My question is, is all that data really necessary in the page? When it has
that much, what does it mean? And how would one cut down on that?





Reply With Quote
  #2  
Old   
Peter Rilling
 
Posts: n/a

Default Re: __VIEWSTATE data HUGE!!! - 09-24-2004 , 11:27 AM






Most ASP.NET controls, by default, place their state in the viewstate. A
large viewstate may indicate that there are some controls such as a calendar
that is included on the page that requires a lot of state management. If
you do not need viewstate on certain controls, then you can disable them by
placing the attribute EnableViewState="false" on those tags.

"Shabam" <blislecp (AT) hotmail (DOT) com> wrote

Quote:
I have an application being developed and I've noticed that in most of the
pages the __VIEWSTATE data is HUGE, about 4 pages full in many cases.
This
leads to bloated page sizes upwards of 50KB and more.

My question is, is all that data really necessary in the page? When it
has
that much, what does it mean? And how would one cut down on that?







Reply With Quote
  #3  
Old   
Ken Dopierala Jr.
 
Posts: n/a

Default Re: __VIEWSTATE data HUGE!!! - 09-24-2004 , 11:31 AM



Hi,

For server controls that you don't need the view state for you can set their
EnableViewState property to false. Things like drop down lists and grids
and stuff use a lot of view state if they contain a lot of data. Setting
their propery to false should reduce your view state size a lot. Good luck!
Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Shabam" <blislecp (AT) hotmail (DOT) com> wrote

Quote:
I have an application being developed and I've noticed that in most of the
pages the __VIEWSTATE data is HUGE, about 4 pages full in many cases.
This
leads to bloated page sizes upwards of 50KB and more.

My question is, is all that data really necessary in the page? When it
has
that much, what does it mean? And how would one cut down on that?







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.