Home » 2011 » March (Page 2)

Archive for March, 2011

Disable Back Button

My .aspx Page <%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”Page1.aspx.vb” Inherits=”_Default” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” > <head runat=”server”> <title>Page 1</title> <script type = “text/javascript” > function preventBack(){window.history.forward();} setTimeout(“preventBack()”, 10); window.onunload=function(){null}; </script> </head> <body> <form id=”form1″ runat=”server”> <h1>My Page</h1> <div> Take me to Google<br /> <asp:Button ID=”Button1″ runat=”server” Text=”Google” /> </div> […]