Request.Servervariables("HTTP_REFERER") versus BACK button on browser

J

JJA

When my webserver does not process a user's change because of an
invalid password, I inform the user and I want to present them a
button for a retry:

<TR id=continuebuttonrow>
<td width="05%">&nbsp;</td>
<TD width="90%" align=center valign=middle colspan=2>
<BUTTON TYPE=BUTTON
ONCLICK="location.href='<% =
Request.ServerVariables("HTTP_REFERER") %>';"
class=btnParms name=btnContinue ID="Button3">Try Again (Back)</BUTTON>
</td>

Yet if this button is clicked, they go back to the server and the page
is refreshed with original values.

If I click the browser's BACK button (rather than my button above), I
go back to the page (from cache I guess) I want (because it contains
the user changes). Here I can correct the password without having to
rekey the changes.

So, what is the Request.Servervariable needed for the equivalent of
the BACK button? Thanks.
 
A

Aaron [SQL Server MVP]

You would use client-side script only, e.g.

onclick='window.history.back();'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top