How do I redirect to last page then refresh screen

Results 1 to 4 of 4

Thread: How do I redirect to last page then refresh screen

  1. #1
    P Weaver Guest

    Default How do I redirect to last page then refresh screen

    In my application I want to: click a submit button on page1, which sends the browser to page2 to process, then go back to the same place on page1 to display changes made. So far, I have not found out how I can: <BR><BR>1. Redirect to previous page (as though clicking the back button), then <BR>2. Reload that page upon arrival (as though clicking the refresh button) to display updated information.<BR><BR>all without the user doing anything except the first click. Any suggestions?

  2. #2
    troy the asp boy Guest

    Default here is one answer

    1) you&#039ll need to make sure that page 1 and page 2 are NOT pulled from the browser&#039s cache. There are several ways to do this. Search the site for the following methods<BR>a) give each page a GUID (globally unique id)<BR>b) or see how the following code works for you...<BR>Response.Expires = -1500<BR>Response.ExpiresAbsolute = Now() - 1<BR>Response.AddHeader "pragma","no-cache"<BR>Response.AddHeader "cache-control","private"<BR>Response.CacheControl = "no-cache"<BR>If you don&#039t make sure that the browser does not use a cached page the user will not know that the information was submitted correctly.<BR>2) on page2 after you&#039ve done all of your processing use the Response.Redirect "page1.asp" statement. to use this, you must not have written any html code. Use Response.Buffer = True to prevent porting HTML until the page is fully processed<BR><BR>troy the asp boy<BR>

  3. #3
    P Weaver Guest

    Default RE: here is one answer

    Thanks Troy, It works mostly how I want... When I get back to page1.asp, it takes me back to the top of the page, instead of where I was. Is there a way it can take me back to the exact location i.e. scrolled partway down the page.<BR><BR>I don&#039t want the user to have to scroll back down to where he was to receive confirmation on the event.

  4. #4
    troy the asp boy Guest

    Default try this and let us know

    why not append the url with an anchor?<BR>ie:<BR>where #Input is an anchor on page1<BR>use something like<BR>&#060;a name="Input"&#062;some text&#060;/a&#062;<BR><BR>this is speculative coding BTW and is worth exactly what you paid for it :)<BR><BR>troy the asp boy<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts