ViewState and efficiency

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I have aspx pages with 10 checkboxlist controls. Each checkboxlist is
databinded from database.
Total individual checkbox (the sum of individual checkbox 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 all that are
checked when postback?

How would you go about doing this efficiently?
Thanks
 
I have aspx pages with 10 checkboxlist controls. Each checkboxlist is
databinded from database.
Total individual checkbox (the sum of individual checkbox 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 all that are
checked when postback?

How would you go about doing this efficiently?
Thanks

Viewstate can really drag your app down depending on bandwidth
limitations and size. I try very hard to turn off viewstate when I
can and store the data on the server side in Session[".."] objects.
Then, you get to worry about server memory instead of bandwidth. :)

You will need to right your own save and restore routines to do it,
but not very hard and sounds like it will be worth it.


Good Luck.
Peter Kellner
http://peterkellner.net
 
Back
Top