Making a simple Back button using JavaScript in ASP.NET

by Dominic Zukiewicz 26. February 2010 10:29

Nothing to complex this time, just for reference really. Sometimes you want a simple button to just go back to the previous page. All you need is:

<asp:Button
runat="server"
Text="<%$Resources:MyResources,Back%>"
OnClientClick="javascript:history.back(); return false;"/>

The reason I'm using an ASP.NET Button is purely for the Localization functionality, so you can use with with HTML controls as well

Tags: ,

ASP.NET | JavaScript

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar