Browser back button creating problem
- by user175084
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();`