Redirect loging page after session expired we can check the session variable and if its null can be redirect.
ex. in page load use this code
protected void page_load(...)
{
if(Session["sesionName"] == null) // cheack session is exist or not
{
page.redirect("login.aspx");// redirect required page
}
}
note :- when we use Globle.aspx file before session expired it session_end method execute. even though we cannot use page redirect withing that method.
No comments:
Post a Comment