code in login.aspx.cs page
protected void Page_Load(object sender, EventArgs e)
{
Session["sessionid"] = Session.SessionID;
}
code in web.config file
--
--
--
--
where timeout="20" is in minutes.
code in home.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
if (Session["sessionid"]==null)
{
Response.Redirect("login.aspx");
}
}
No comments:
Post a Comment