ASP.NET: Unable to validate data

前端 未结 8 1502
野的像风
野的像风 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条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 06:54

    I got this error when I had a form tag setup on my page without an action attribute, and then in the code-behind, I changed the form's action attribute to "Action.aspx".

    And in JavaScript, I submitted the form (theForm.submit();)

    I think in my case it was a security issue, and that you can't change this after it's already been set on the page... ?

提交回复
热议问题