Hi,
If you have a master page then put the trapping in
masterpage code behind.
Example code:
In you login page code behind should content
Session["UserId"] = user.UserId;
protected void Page_Load(object sender, EventArgs e)
{
ClientScriptManager s = Page.ClientScript;
if (!IsPostBack)
{
txtUserId.Text = Session["UserId"];
if (txtUserId.Text == string.Empty)
{
Response.Redirect("login.aspx");
}
}
}
If ever the session expire, the
Session["UserId"] automaticaly
should contents empty, therefore redirecting to login page...
Hope this could help...
Do not forget to vote if could help...
Regards,