|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
minimizing viewstateI have aspx pages with 10 checkboxlist controls. total individual checkbox
(the sum of individual checbox in those 10 checkboxlists) on the page is about 1710. You can imagine how large the viewstate is. Is there anyway I can shrink the viewstate and at the same time get the values of each checkbox after postback? Thanks On Wed, 26 Apr 2006 15:00:03 -0400, "Justin" <jus***@hotmail.com> On this same point is there anyway to disable saving the data ofwrote: >I have aspx pages with 10 checkboxlist controls. total individual checkbox >(the sum of individual checbox in those 10 checkboxlists) on the page is >about 1710. You can imagine how large the viewstate is. Is there anyway I >can shrink the viewstate and at the same time get the values of each >checkbox after postback? > >Thanks > controls that hold large amounts of data such as dropdownlists and datagird but still allow them to store all the smaller values in viewstate for things like which item index/row index was last selected? This would have the basic contract that you would be responsible for repopulating the data during the init phase so that it is ready for LoadSavedState. You should ask this question in the aspnet groups, not here.... but
anyhow.... Not sure about the Checkboxlist.... but disabling ViewState does not prevent you from getting a postback value from any control. In Page_Load "reconstruct" your checkboxes.... the events fire next, and you will be able to retrieve the Postbox "value." I haven't experimented with Checkboxlist.... I know things with ViewState can get a bit confusing. Show quoteHide quote "Chris Chilvers" <kee***@dynafus.com> wrote in message news:72a0521vg4js7voira5tps7vl20uuviudv@4ax.com... > On Wed, 26 Apr 2006 15:00:03 -0400, "Justin" <jus***@hotmail.com> > wrote: > >>I have aspx pages with 10 checkboxlist controls. total individual >>checkbox >>(the sum of individual checbox in those 10 checkboxlists) on the page is >>about 1710. You can imagine how large the viewstate is. Is there anyway >>I >>can shrink the viewstate and at the same time get the values of each >>checkbox after postback? >> >>Thanks >> > > On this same point is there anyway to disable saving the data of > controls that hold large amounts of data such as dropdownlists and > datagird but still allow them to store all the smaller values in > viewstate for things like which item index/row index was last > selected? > > This would have the basic contract that you would be responsible for > repopulating the data during the init phase so that it is ready for > LoadSavedState. Also
>> On this same point is there anyway to disable saving the data of Yeah. Disable ViewState for the control, and add your own values to >> controls that hold large amounts of data such as dropdownlists and >> datagird but still allow them to store all the smaller values in >> viewstate for things like which item index/row index was last >> selected? ViewState manually (ViewState("myvalue") = Somecontrol.SomeValue) and reset the property in question of the control on Postbacks in Page_Load. In fact, try completely disabling the ViewState for the Checkboxlist control and see if you lose anything. I'll be you don't. If you're adding items manually in Page_Load rather than in the designer simply remove the If Me.IsPostBack and "reconstruct" the items on every postback. This works beautifully and everything works! Note you do not have to "reconstruct" the items in your Checkboxlist in Page_Load if you define the items in the ASP markup (in the designer). Only if you create the Checkboxlist.Items manually in code (in the Page_Load event for instance). Basically, ViewState allows you to make changes to your controls in the Code-Behind and have those changes saved on subsequent postbacks. Show quoteHide quote "CMM" <cmm@nospam.com> wrote in message news:eRCzGWcaGHA.1348@TK2MSFTNGP05.phx.gbl... > You should ask this question in the aspnet groups, not here.... but > anyhow.... > > Not sure about the Checkboxlist.... but disabling ViewState does not > prevent you from getting a postback value from any control. In Page_Load > "reconstruct" your checkboxes.... the events fire next, and you will be > able to retrieve the Postbox "value." > > I haven't experimented with Checkboxlist.... I know things with ViewState > can get a bit confusing. > > -- > -C. Moya > www.cmoya.com > "Chris Chilvers" <kee***@dynafus.com> wrote in message > news:72a0521vg4js7voira5tps7vl20uuviudv@4ax.com... >> On Wed, 26 Apr 2006 15:00:03 -0400, "Justin" <jus***@hotmail.com> >> wrote: >> >>>I have aspx pages with 10 checkboxlist controls. total individual >>>checkbox >>>(the sum of individual checbox in those 10 checkboxlists) on the page is >>>about 1710. You can imagine how large the viewstate is. Is there anyway >>>I >>>can shrink the viewstate and at the same time get the values of each >>>checkbox after postback? >>> >>>Thanks >>> >> >> On this same point is there anyway to disable saving the data of >> controls that hold large amounts of data such as dropdownlists and >> datagird but still allow them to store all the smaller values in >> viewstate for things like which item index/row index was last >> selected? >> >> This would have the basic contract that you would be responsible for >> repopulating the data during the init phase so that it is ready for >> LoadSavedState. > >
Image Upload problem - tearing hair out here!!
date calculations Do loop memory consumption? Books: (I'm converting vb release 4 to release 8) But will eventually move it to other PCs Writing and reading from a template Excel file using ADO.Net - results not recalculated Red Semaphore. Ideas? simple OO question Generating Reports Using VB.net Classes and collections vs. virtual tables (datasets) Display All Domain Names on the Network |
|||||||||||||||||||||||