ASP - Form redirect to same page - BACK button does not work ???

Discussion in 'ASP General' started by Hugo Botha, Jul 11, 2004.

  1. Hugo Botha

    Hugo Botha Guest


    I have created 2 asp pages called testa.asp and testb.asp

    testa.asp has a link to go to next page testb.asp

    testb.asp has a form that ask you for a reference number and post it
    to the same page testb.asp

    If the reference number is not blank, it will just write out what the
    reference number is.

    Now my problem....

    If you go to testa.asp and click on the link to go to testb.asp you
    will see the form. At this point, if you click the back button, it
    till take you back to testa.asp ALL FINE SO FAR.

    If you go to testb.asp again and see the form, enter a number say 33
    and click on search. This will now show you the number you have just
    entered. NOW - click on the BACK BUTTON, it will just show you exactly
    the same page ! WHY does it not go back to the FORM in order to refill
    in a different number.

    You can see this example on :

    Here is the code for testa.asp
    Response.Expires = -2000 'Makes the browser not cache this page

    <a href="testb.asp">click</a>

    Here is the code for testb.asp
    Response.Expires = -2000 'Makes the browser not cache this page
    Reference_No = Request.Form("Reference_No")

    If Reference_No = "" Then


    <form name=form1 action=testb.asp method=post>

    <TABLE cellSpacing=0 cellPadding=5>
    <TD align="center" class=txt><B>Reference Number
    <input type=text name=Reference_No size="25" value=""
    <input type=hidden name=login value=true>
    <input type=submit value="Search"></TD>


    response.write " reference number = " & Reference_No
    End If

    Can anyone help please ????


    Thank you very much

    Hugo Botha, Jul 11, 2004
    1. Advertisements

  2. Hugo Botha

    Maarten Guest

    <form name=form1 action=testb.asp method=post target="_blank">
    Maarten, Jul 11, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.