Hello,
I have the redirection working where the user depending on their role will go to a page that they have access to, but when they
logout or when the browser is closed and they return to the site and sign back in they go to the last page they were on instead of going to a set page where I have the code pointing to. Is there a way to stop this and have them go to the page I set for them?
What I have tried:
<asp:Login ID="LoginControl" runat="server" OnLoggingIn="LoginControl_LoggingIn">
<layouttemplate>
.....
CODE BEHIND:
protected void LoginControl_LoggingIn(object sender, System.Web.UI.WebControls.LoginCancelEventArgs e)
{
if (Page.User.IsInRole("NFI"))
{
Response.Redirect("~/AdminPages/Administration.aspx");
}
else if (Page.User.IsInRole("Partner"))
{
Response.Redirect("~/Partners/QuotePricing.aspx");
}
else if (Page.User.IsInRole("Customer"))
{
Response.Redirect("~/Customers/Customers.aspx");
}
}