Hi we can prevent the pages ability to go back by using java script. Suppose From Default.aspx page we go to Default2.aspx and we dont want to go to default.aspx from default2.aspx. for this we can place make place javascript on default.aspx.
Place this between head tags of Default.aspx.
<script type = "text/javascript" >
function disableBackButton()
{
window.history.forward(1);
}
setTimeout("disableBackButton()", 0);
</script>
call this script in body load and unload events so that it will work on all browsers.
<body onload="disableBackButton();" onunload="disableBackButton();">
Thanks Martin
ReplyDeleteWelcome ... :)
ReplyDeletecode not working in IE
ReplyDeletePlz check the code in ur IE correctly. it is working in IE..
ReplyDeleteBABA need to Study Copy pasting Code ... lol
ReplyDelete