Link to home
Start Free TrialLog in
Avatar of swtiley
swtiley

asked on

Hyperlink emulate Back Button

Hi, I am very new to ASP so apologies if this is very basic but any help to solve my problem would be very much appreciated.

I have a hyperlink that I want to act like the IE Back button, simply to go back one page.

Looking through Experts Exchange I think I need to use the following code

<a href="javascript:history.go(-1)"> back</a>

however, as I am programming in VB.Net I am unsure of where to put this in the ASP Code.

My hyperlink is currently in a table and the associated ASP code at the moment is

<tr>
        <td style="width: 100px">
            <asp:HyperLink ID="HyperLink1" runat="server" ForeColor="Red"
                Style="left: 8px; position: relative; top: 0px" Visible="False" Width="627px" >No Forthcoming Appointments Found</asp:HyperLink></td>
               
 </tr>
   
Can someone please help me by showing me how to make this hyperlink act like the Back button.

Thanks
...Steve
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swtiley
swtiley

ASKER

Thanks Tim, epecially for the quick response.

I took the pageload option, and works fine.

Cheers
...Steve