I have a problem with my role redirection. Why my code
{
if (Roles.IsUserInRole(Login1.UserName, "Adminstrator"))
Response.Redirect("~/4_Admin/Page1.aspx");
else if (Roles.IsUserInRole(Login1.UserName, "Users"))
Response.Redirect("~/3_User/Expense.aspx");
}
is not working? It give me a headache after I spent like what, 3 days? Thank you for your time.
The role “Adminstrator” is missing the letter i – add that in and the first branch of the IF statement should start working.