Error while debug (role redirection)

Posted by Chris White on Stack Overflow See other posts from Stack Overflow or by Chris White
Published on 2012-08-31T02:55:19Z Indexed on 2012/08/31 3:38 UTC
Read the original article Hit count: 102

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET