I want to disable viewstate for almost all of my pages, and I used the element for this in my web.config.
On a page that specifically uses viewstate, I used EnableViewState = true. However, the page does not work, and dropdownlists that depended on the viewstate are not populated in the postback.
To try to find the template, I was able to specify a DISABLE viewstate at the page level, while web.config was set to true, but I cannot do the opposite where web.config is set to false, and the page is set to true
Any ideas on anything else that might be conflicting?
UPDATE: I created a new empty project to experiment with this, and apparently either ASP.NET is broken or it is not designed to work that way. If I enableViewState = false in web.config, I cannot enable it at the page level. However, if I set it to true, I can disable it at the page level.
UPDATE UPDATE: I got it to work on an empty project. Not quite sure what has changed, which made it work all of a sudden. Now I have set the web.config parameter to false, and the page is set to true, and the page saves the viewstate over the postback. This means that it is something specific to my larger, more complex project.
Jeff martin
source share