Izabela Wlodarska
Izabela Wlodarska

Reputation: 412

How to make a "back" link in Kentico CMS?

I have a website which use Kentico CMS. On each website I have few webparts and in one of them I would like to add "go back" link. I try to do it in that way:

<asp:HyperLink runat="server" ID="hlkGoBack" Text="Go back" NavigateUrl="#" OnClick="javascript:history.go(-1)" Visible="true"></asp:HyperLink>

But it doesn't work - it redirect me to a CMSWebPart folder.

Do you have any working ideas how to do it?

Upvotes: 0

Views: 321

Answers (2)

Gabby J. Paolucci
Gabby J. Paolucci

Reputation: 927

You could also use the pure HTML:

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

Upvotes: 1

Daveloper
Daveloper

Reputation: 159

Could you try this?

<asp:HyperLink runat="server" ID="hlkGoBack" Text="Go back" NavigateUrl="javascript:history.go(-1)" Visible="true"></asp:HyperLink>

Upvotes: 1

Related Questions