错误的细节如下.此错误仅偶尔/很少/有时发生,并且没有任何步骤来重现它.
我怎么知道哪个控件抛出了这个Viewstate错误?
错误消息:无法加载视图状态.正在加载视图状态的控制树必须与在上一个请求期间用于保存视图状态的控制树匹配.例如,在动态添加控件时,在回发期间添加的控件必须与初始请求期间添加的控件的类型和位置相匹配.
时间:很少/偶尔
重新创建的步骤:不能
堆栈跟踪:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList …Run Code Online (Sandbox Code Playgroud)