JavaScript Code To Disable Browser Back Button In Asp.net
23:17
Here I am explaining how to disable browser back button using javascript in Asp.Net
write the below code in head section of which page you want to disable back button..
write the below code in head section of which page you want to disable back button..
<head runat="server">
<title></title>
<script type="text/javascript"
language="javascript">
function DisableBackButton() {
window.history.forward()
}
DisableBackButton();
window.onload = DisableBackButton;
window.onpageshow = function (evt) { if (evt.persisted) DisableBackButton() }
window.onunload = function () { void (0) }
</script>
</head>
then run the page..
0 comments :