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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top