Posted on: 4/1/2014 12:44:41 PM | Views : 2164

Hello,
I am tying to bind a dropdownlist with all roles in asp.net web forms app (VS 2013)...with following bind method...
public IQueryable<IdentityRole> BindRoles() { var roles = roleManager.Roles; return roles; } How do I initialize...
public ApplicationDbContext context; private UserManager<ApplicationUser> userManager; public RoleManager<IdentityRole> roleManager; protected override void OnInit(EventArgs e) { base.OnInit(e); context = new ApplicationDbContext(); userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(context)); roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(context)); } Dropdownlist Binding: SelectMethod="BindRoles"
But when I run the page it has foll ...

Go to the complete details ...