Abandon session and call authentication.
Hello Friends!
I am using Timer and as the time reaches to 5 seconds I am trying to abandon the session but it is not happening with session.abandon method but when I am using Session.Clear() method then Session are being clear after that I am redirecting my login page which is HomePage.aspx but after redirecting the Homepage.aspx if I paste the URL of my previous page then it is going successfully to it I dont want it to go back to the previous page untill User authenticate the Login Page. how can I do this please suggest me. I have set the authentication also.
protected void Timer1_Tick(object sender, EventArgs e)
{
Session["scnds"] = Int32.Parse(Session["scnds"].ToString()) + 1;
Label1.Text = Session["scnds"].ToString();
ReSetTime += 1;
if ( Int32.Parse(Session["scnds"].ToString()) == 5)
{
Session.Abandon();
Response.Redirect("HomePage.aspx");
}
}
Thanks!
__________________
DPK..
|