1

I am using viewstate in my webparts

ViewState["CurrentPageNo"] = 22;

But this is not working on my production environment as enableview state is false in web.config. How can we enable it on pagelevel without modifying web.config?

0

You can try to enable it in the Master page and see if it works. something like this

<@Page EnableViewState="true" />

https://social.technet.microsoft.com/Forums/sharepoint/en-US/f3629e65-d125-4c4d-9c80-c9e18b1088a1/viewstate-in-master-page-is-missing?forum=sharepointdevelopmentprevious

But it is really recomendid to do this via web.config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.