How to disable browser\'s BACK Button (across browsers)?
Even I faced the same situation before...and didn't have any help. try these things maybe these will work for you
in login page <head>
tag:
<script type="text/javascript">
window.history.forward();
</script>
in Logout Button I did this:
protected void Btn_Logout_Click(object sender, EventArgs e)
{
connObj.Close();
Session.Abandon();
Session.RemoveAll();
Session.Clear();
HttpContext.Current.Session.Abandon();
}
and on login page I have put the focus on Username textbox like this:
protected void Page_Load(object sender, EventArgs e)
{
_txtUsername.Focus();
}
hope this helps... :) someone plz teach me how to edit this page...
<script>
$(document).ready(function() {
function disableBack() { window.history.forward() }
window.onload = disableBack();
window.onpageshow = function(evt) { if (evt.persisted) disableBack() }
});
</script>