We can use the javascript code below to prevent the use of backbutton in asp.net webpages.
<script type="text/javascript">
function noBack(){window.history.forward();}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack();}
window.onunload=function(){void(0);}
</script>
i have been searching google from so many days,a page full of codes, none of the code worked properly.
ReplyDeletebut this few lines of code worked buddy......
thanks :-)