Anything that stores data will hold viewstate, which is most controls. The
GridView, for example, will store every row in ViewState. This allows you to
load once and have it persist through multiple postbacks (changing drop
downs, button clicks, etc.).
Realize if you turn off ViewState, to keep it small, you will have to
repopulate any controls that hold data.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think Outside the Box!
*************************************************
"Arjen" <bo*****@hotmail.comwrote in message
news:ec**********@news3.zwoll1.ov.home.nl...
When I have made my own paging control, let's say that I click on the
'next page' button.
This event will update my list, does the list and the 'next page' button
use viewstate?
Thanks!
Arjen
"werD" <we**@discussions.microsoft.comschreef in bericht
news:88**********************************@microsof t.com...
>easy way to decrease viewstate is to disable it on controls that arent
used
specifically during a postback. ie. if a datagrid is only displaying data
and
not being used for updates and such it can safely be disabled and will
decrease viewstate size.
In short go through your page by control and determine if each control is
being requested during your post backs if not disable viewstate
"Arjen" wrote:
>>Hi,
How do I keep the viewstate small?
I think I'm only using it for redirection
(String)ViewState["UrlReferrer"].
Thanks!
Arjen