Disable browser's back button

后端 未结 20 1420
猫巷女王i
猫巷女王i 2020-11-22 04:27

How to disable browser\'s BACK Button (across browsers)?

20条回答
  •  渐次进展
    2020-11-22 05:23

    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 tag:

    
    

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

提交回复
热议问题