Using hyperlink as back button

Discussion in 'ASP .Net' started by Mike P, Jan 31, 2008.

  1. Mike P

    Mike P Guest

    I need to use a hyperlink as a back button, using
    javascript:history.go(-1). But the ASP.NET hyperlink control doesn't
    have an onClick event, and the HTML anchor tag requires a href.

    How can I use the javascript to go back a page using a hyperlink?



    *** Sent via Developersdex http://www.developersdex.com ***
    Mike P, Jan 31, 2008
    #1
    1. Advertising

  2. Use an HTML hyperlink. If you need to load it dynamically, you can put it
    into a LiteralControl, panel, or whatever Control you like.

    --
    HTH,

    Kevin Spencer
    Chicken Salad Surgeon
    Microsoft MVP

    "Mike P" <> wrote in message
    news:eZZrU1$...
    >I need to use a hyperlink as a back button, using
    > javascript:history.go(-1). But the ASP.NET hyperlink control doesn't
    > have an onClick event, and the HTML anchor tag requires a href.
    >
    > How can I use the javascript to go back a page using a hyperlink?
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Kevin Spencer, Jan 31, 2008
    #2
    1. Advertising

  3. try

    navigateurl="javascript:history.go(-1);" />


    --
    Misbah Arefin



    "Kevin Spencer" wrote:

    > Use an HTML hyperlink. If you need to load it dynamically, you can put it
    > into a LiteralControl, panel, or whatever Control you like.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Chicken Salad Surgeon
    > Microsoft MVP
    >
    > "Mike P" <> wrote in message
    > news:eZZrU1$...
    > >I need to use a hyperlink as a back button, using
    > > javascript:history.go(-1). But the ASP.NET hyperlink control doesn't
    > > have an onClick event, and the HTML anchor tag requires a href.
    > >
    > > How can I use the javascript to go back a page using a hyperlink?
    > >
    > >
    > >
    > > *** Sent via Developersdex http://www.developersdex.com ***

    >
    >
    >
    Misbah Arefin, Jan 31, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sylvia sil
    Replies:
    1
    Views:
    597
    Curt_C [MVP]
    Dec 29, 2004
  2. Chicagoboy27

    image button as a back button

    Chicagoboy27, Oct 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,998
    Chicagoboy27
    Oct 30, 2006
  3. phancey
    Replies:
    3
    Views:
    2,572
  4. Author
    Replies:
    6
    Views:
    3,069
    George
    Jan 22, 2009
  5. Useful Info

    Firefox back button takes me back 2 pages.

    Useful Info, Jun 3, 2007, in forum: Javascript
    Replies:
    0
    Views:
    332
    Useful Info
    Jun 3, 2007
Loading...

Share This Page