Back to same position on page
-
I have a grid view with some links to take you to details of the item in the grid. On the details page is a link to go back to the page containing the grid. I want this link to return people to the same position on the page like the back button does. I can't use "javascript:history.back()" because if they sort items on the details page it will no longer take them back to the grid but just 'unsort' the current page. I have anchors on the page which kind of work. But they will always put the grid item at the top of the page, And if they clciked it at the bottom it will be quite a different position. Any ideas anyone? Sorry this is a bit long.
-
I have a grid view with some links to take you to details of the item in the grid. On the details page is a link to go back to the page containing the grid. I want this link to return people to the same position on the page like the back button does. I can't use "javascript:history.back()" because if they sort items on the details page it will no longer take them back to the grid but just 'unsort' the current page. I have anchors on the page which kind of work. But they will always put the grid item at the top of the page, And if they clciked it at the bottom it will be quite a different position. Any ideas anyone? Sorry this is a bit long.
What you can do is pass the id of a control to your page in the querystring, or store as a session item or cookie or however you chose. Then in the codebehind on page load set focus to that control.
-
I have a grid view with some links to take you to details of the item in the grid. On the details page is a link to go back to the page containing the grid. I want this link to return people to the same position on the page like the back button does. I can't use "javascript:history.back()" because if they sort items on the details page it will no longer take them back to the grid but just 'unsort' the current page. I have anchors on the page which kind of work. But they will always put the grid item at the top of the page, And if they clciked it at the bottom it will be quite a different position. Any ideas anyone? Sorry this is a bit long.
Try this one: http://www.codeproject.com/aspnet/lili2.asp It helped me ;-)