back Button issue...and logout button
<p>I have searched lot on google for this. I got all the code but that code doesn't work. I created a logout button and on button's click redirecting user to logout page...but further things don't go well.</p>

<p>here is code for logout page</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    Session.Abandon();
    Session.Clear();
    Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetNoStore();  

}
protected void Timer1_Tick(object sender, EventArgs e)
{
    string redirectUrl = FormsAuthentication.LoginUrl + "?ReturnUrl=loginAcc.aspx";
    FormsAuthentication.SignOut();
    Response.Redirect(redirectUrl);

}
</code></pre>

<p><strong>Edit</strong>: The Following Exception occurs: The resource cannot be found. </p>

<p>Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: <code>/MailFormat/login.aspx</code> </p>
