|
|
||||||
|
#1
|
|
|
|
|
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? |
|
|
|
#2
|
|
|
|
|
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> wrote in message news:n-qg [..] |
|
#3
|
|
|
|
|
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. |
|
|
| Similar Threads | |
| Change __VIEWSTATE to something else Is it possible to change the __VIEWSTATE id? The reason is we shouldn't have any id starting with underscores on XHTML pages. Thank you |
|
| __VIEWSTATE different between localhost and server Hello, I was testing my application on my localhost, when I View Source, I see the __VIEWSTATE and its only small in size (about 500 bytes). When I copy this same... |
|
| ASP + Ajax + __VIEWSTATE = BAD ? I have a ASP 2.0 page where I use some Ajax code. The Ajax code (JavaScript) is inserted from CodeBehind. In my page I have a submit button and some links for Ajax... |
|
| __VIEWSTATE Hi all, We have a problem here regarding this __VIEWSTATE data. CMS always keep data in viewstate and the data might be very big. Our search engine will only search for the... |
|
| __VIEWSTATE I have a page, with an iframe in it. the iframe loads up another ASPX page, I have set both pages enableviewstate=false The problem is, if I click on anything on the main... |
|
|
All times are GMT. The time now is 11:22 PM. | Privacy Policy
|