Event processing and viewstate build-up

  • Thread starter Thread starter msch.prv
  • Start date Start date
M

msch.prv

Thanks for bearing with me. I am confronted with huge hidden
viewstates fields in some pages and looking for ways to make these
pages leaner.

My problem hinges on how to efficiently handle events that rely on
viewstate data (SelectedIndexChanged, etc.). Are there any
alternatives for processing data control events (eg. gridview/datalist
etc.) that would not depend on the viewstate? Alternatively, is it
possible to selectively filter out portions of the viewstate to just
support event handling? TIA for any pointers.
 
Simply turning off viewstate for controls that do NOT fire events may help
substantially. If not, you might consider server-side viewstate (Google for
articles/blogs).
 
I always run with viewstate turned off. just initialize the controls in
oninit, and all events will fire. i generally have no code in onload, only
oninit, prerender and event handlers.

-- bruce (sqlwork.com)
 
Back
Top