Browser back button creating problem
Posted
by user175084
on Stack Overflow
See other posts from Stack Overflow
or by user175084
Published on 2009-12-17T19:44:00Z
Indexed on
2010/04/03
14:53 UTC
Read the original article
Hit count: 344
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();`
© Stack Overflow or respective owner