Cannot disable ViewState

B

Baohua Li

I use repeater in my lookup pages and a hidden textbox in the repeater to
store key/description. When users select an item, I use javascription to get
the value from hidden textbox. Since it is lookup page, I don't need any
ViewState. After I set EnableViewState to false, __VIEWSTATE is reduced but
it still quite big. I think even I set EnableViewState to false, APS.NET
still create some state information for all textboxes. Is there a way to
remove it?

Thanks,

Li
 
T

Teemu Keiski

Hi,

some ViewState is generated always for internal purposes, you cannot change
that unless you remove the whole server-side form. You can remove the
__VIEWSTATE hidden field from client-side to server-side if you save it to
say Session (probably not valid step at all in your case) by overriding a
couple of Page class methods. Check this article for further details about
ViewState:

http://www.aspalliance.com/135
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top