0

I am trying to reload a classic .asp page after a user does an update via a form.

The page contains about three screenfuls of information.

The update works perfectly well, but I'm aiming to have the updated page show at the same point where the user left it, just before performing the update.

I am using this :

Response.Redirect("viewstudent.asp")

This does reload the correct page after the update, but the user has to scroll down to the place where he started from.

Is there any way to make some sort of "bookmark" to make the page reload at a specific point?

Thank you.

Jim
  • 17
  • 4
  • Possible duplicate of [How do I link to part of a page? (hash?)](https://stackoverflow.com/questions/2835140/how-do-i-link-to-part-of-a-page-hash) – user692942 May 24 '17 at 19:46

2 Answers2

0

use html anchors in your code, then do a redirect and include that anchor in the url string:

Response.Redirect("viewstudent.asp#anchorId")
Josh Montgomery
  • 882
  • 5
  • 10
  • Thanks for the suggestion, Josh. Unfortunately it did not work (had no effect)., however, I set up a 'bare bones' page with minimum functionality – Jim May 26 '17 at 07:57
  • (sorry, that last comment was incomplete, so please ignore t). Josh Montgomery - Thanks for the suggestion - unfortunately it did not work (had no effect at all). However, I set up a 'bare bones' .asp page with minimum functionality, on 'localhost', and your code worked perfectly. I eventually did solve the problem by using this : `Response.Redirect("viewstudent.asp#anchorId")` and this solved the problem. – Jim May 26 '17 at 08:05
-1

Try a simple piece of Javascript...

<script type="text/javascript">window.reload();</script>

Nick Green
  • 428
  • 3
  • 8
  • 18
  • That's the wrong programming language and fails to address the question of scrolling to the right point. – Quentin Jun 12 '17 at 13:51
  • All he would have to do is tie an HTML anchor to where he wants the page to load. Josh's answer below will work though. – Nick Green Jun 13 '17 at 07:20