Hi, I have created a button click event for logout on masterpage.
I have to click twice the button get redirected to desired page.
protected void btnLogout_Click(object sender, EventArgs e)
{
Session.Abandon();
Session["StaffID"] = null;
Session["User"] = null;
Session.RemoveAll();
Response.Clear();
Response.Redirect("~/Logout");
}