c# - page theme causing "Failed to load viewstate." error -
in web.config have following:
<pages theme="mytheme" enablesessionstate="true" validaterequest="false"  enableeventvalidation="false" viewstateencryptionmode="never"  enableviewstatemac="false">   as added theme property instantly started receive:
failed load viewstate. control tree viewstate being loaded must match control tree used save viewstate during previous request.for example, when adding controls dynamically, controls added during post-back must match type , position of controls added during initial request.
when remove theme, no longer viewstate errors. can offer inside happening or how fix it?
thanks.
fixed by:
- adding 
runat="server",idattributes link (stylesheet) - calling 
page.header.findcontrol("link").databind()in page_load method of master page. 
do not call page.header.databind(); since databind entire header.
Comments
Post a Comment