浏览器后退按钮创建问题
我在页面上有一个动态生成的网格视图,后面的代码中也提供了排序。 现在我使用链接从页面 A 移动到页面 B,这也很好用。 但是当我按下浏览器后退按钮并返回到我的页面 A 并再次尝试排序...页面 A 抛出异常...
有没有一种方法可以像我们通常编程按钮一样对该后退按钮进行编程..
谢谢
` 找不到列机器名。 描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。
Exception Details: System.IndexOutOfRangeException: Cannot find column machinename.
Source Error:
Line 519:
Line 520: //Sort the data.
Line 521: dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
Line 522: GridView1.DataSource = Session["TaskTable"];
Line 523: GridView1.DataBind();`
I have a dynamically generated gridview on page with sorting provided in the code behind also.
Now i move from page A to page B using a link, this also works fine.
But when i press the browser back button and come back to my page A and again try to sort... page A throws an exception...
is there a way to program this back button like we program a button normally..
Thanks
` Cannot find column machinename.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Cannot find column machinename.
Source Error:
Line 519:
Line 520: //Sort the data.
Line 521: dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
Line 522: GridView1.DataSource = Session["TaskTable"];
Line 523: GridView1.DataBind();`
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
页面 A 可能已缓存在您的浏览器中。单击返回时您将获得此缓存版本。尝试强制浏览器不将页面缓存在(页面 A 的)后面的代码中:
Page A is probably cached in your browser. You get this cached version when clicking back. Try forcing the browser not to cache the page in the the code behind (of page A) with: