且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

该页面的状态信息无效,并且可能已损坏.错误

更新时间:2022-11-17 10:33:41

做一些初步研究.这应该有帮助- ^ ]

如果没有帮助,请再次返回您的发现.
Do some initial research. This should help - The state information is invalid for this page and might be corrupted[^]

If it doesn''t help, come back again with your findings.


使用Page.IsPostback属性.事件单击时,当页面回发时,您的Display()方法将重新执行并使用Grid附加数据.

试试:
Use Page.IsPostback property. On event clicks, when page gets postback, your Display() method re-executes and attaches data with Grid.

Try:
protected void Page_Load(object sender, EventArgs e)
{
   if(!IsPostback)
   {
     string userID = Session["Member"].ToString();
     Display();
   }
}