i am using the asp.net membership that ships with asp.net-mvc sample app. how do i set certain users up as an Admin role versus a regular Member role?
+2
A:
I suppose the way is like Asp.NET WebForms:
Roles.AddUserToRole(User.Identity.Name, selectedRole)
Take a look here http://quickstarts.asp.net/QuickStartv20/util/srcview.aspx?path=~/aspnet/samples/security/Add_Delete_UserRoles.src and here http://quickstarts.asp.net/quickstartv20/aspnet/doc/security/membership.aspx for samples.
m.bagattini
2009-07-31 12:26:39