ASP.NET: Unable to validate data

前端 未结 8 1461
野的像风
野的像风 2020-12-08 06:31

What is the cause of this exception in ASP.NET? Obviously it is a viewstate exception, but I can\'t reproduce the error on the page that is throwing the exception (a simple

8条回答
  •  -上瘾入骨i
    2020-12-08 06:42

    In .NET 3.5 SP1 the RenderAllHiddenFieldsAtTopOfForm property was added to the PagesSection configuration.

    Web.config

    
    
        
    
            
    
        
    
    
    

    Interestingly, the default value of this is true. So, in essence, if you are using .NET 3.5 SP1 then the ViewState is automatically being rendered at the top of the form (before the rest of the page is loaded) thus eliminating the ViewState error you are getting.

提交回复
热议问题