“状态信息对于此页面无效,可能已损坏。”使用树视图时出错 [英] "The state information is invalid for this page and might be corrupted." Error while using tree View

查看:77
本文介绍了“状态信息对于此页面无效,可能已损坏。”使用树视图时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序的某些页面上出现错误,错误是状态信息对于此页面无效并且可能已损坏。



此错误发生在树视图调用的页面的按钮单击事件上



Plz分享有关此问题的任何信息或链接...

I m Getting an error on certain pages of my application the error is "The state information is invalid for this page and might be corrupted."

This error occur on Button click event of pages that are called by Tree view

Plz Share any information or link regarding this Issues...

推荐答案

当您在运行时动态地向页面添加/删除控件时,通常会发生这种情况。更具体地说,您是在页面的回发事件期间添加/删除页面的控件吗?每次执行此操作时,页面的视图状态都会更改。如果在连续回发期间修改了页面的视图状态(通过添加/删除控件),则会发生此错误。

每个错误都是页面唯一的,因此如果没有错误就很难解决知道页面上发生了什么。但这是一个普遍的提示,我将帮助您调试正确的位置。
This usually happens when you dynamically add/remove controls to your page at runtime. To be more specific, are you adding/removing controls of the page during a postback event of the page? Every time you do that, the viewstate of the page is altered. If the view state of the page is modified (by adding/removing controls) during successive postbacks, this error can occur.
Every error is unique to the page, and hence it is difficult to solve it without knowing what is happening on the page. But this is a general hint I am giving you to help you debug the right places.


这篇关于“状态信息对于此页面无效,可能已损坏。”使用树视图时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆