Friday, September 10, 2010

A back button for ASP.NET pages



In order to implement a back button in ASP.NET we need to use Java Script history object and avoid the Post Back, the code below is the solution for this problem:



<asp:Button ID="button_history_back"
runat="server"
Text="Back"
CausesValidation="false"
OnClientClick="Javascript:history.go(-1); return false;"
/>




No comments:

Post a Comment