i just want to redirect user to Home Page(Default.aspx) when session has been expired in asp.net 3.5. i just do it with web user control but steel it\'s not work perfectly. so i
For No Master Page:
you may try this.
protected void Page_Load(object sender, EventArgs e)
{
if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
{
if (!IsPostBack)
{
}
}
else
{
Response.Redirect("Default.aspx", false);
}
}
Use this logic in every webpage
If Master Page is Used:
Use the above logic in your masterpage.cs file
Using Web.Config: