简体   繁体   中英

Change default value of EnableViewState

I know that with other properties you can define their default value by using skins. But for some reason they won't let me do this for EnableViewState.

I don't want EVERYTHING set to EnableViewState="false" I just want them to default to false then if I want them to I can go through and enable them manually.

The cleaner the solution the better. I'm hoping to shy away from running some obtrusive function in pageload that disables all viewstates as it's recursive nature could be expensive and in my head it feel obtrusive.

This is not possible with current version of asp.net, but the new one will from what I remember work exactly like that. Here is a link: http://www.asp.net/LEARN/whitepapers/aspnet4/default.aspx#_TOC3_2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM