JavaScript Code To Disable Browser Back Button In Asp.net

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..

<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..