Error while debug (role redirection)
- by Chris White
What is wrong with my role redirection,
protected void Login1_LoggedIn(object sender, EventArgs e)
{
{
if (Roles.IsUserInRole(Login1.UserName, "Aemy"))
Response.Redirect("~/Admin/Home.aspx");
else if (Roles.IsUserInRole(Login1.UserName, "User"))
Response.Redirect("~/Welcome/User1.aspx");
}
}
Error : The name 'Roles' does not exist in the current context