Using hyperlink as back button

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 [ Do, 31 Januar 2008 12:35 ] [ ID #1920704 ]

Re: Using hyperlink as back button

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" <mike.parr [at] gmail.com> wrote in message
news:eZZrU1$YIHA.4028 [at] TK2MSFTNGP06.phx.gbl...
>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 [ Do, 31 Januar 2008 13:06 ] [ ID #1920708 ]

Re: Using hyperlink as back button

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" <mike.parr [at] gmail.com> wrote in message
> news:eZZrU1$YIHA.4028 [at] TK2MSFTNGP06.phx.gbl...
> >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 ***
>
>
>
MisbahArefin [ Do, 31 Januar 2008 21:23 ] [ ID #1920768 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Using hyperlink as back button

Vorheriges Thema: Response.Clear() doesn't clear
Nächstes Thema: Limiting T-SQL code as a .NET development standard