| | |
Roles.IsUserInRole() can't get it work !!!
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
![]() |
•
•
Join Date: May 2007
Posts: 8
Reputation:
Solved Threads: 0
Using ASP.NET Web Admin tool, i created 5 users and assigned them to different roles, but when i try to user Roles.IsUserInRole, it doesn't work, please take a look here:
ASP.NET Syntax (Toggle Plain Text)
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { string username = Login1.UserName; string password = Login1.Password; if (!IsPostBack) { if (Membership.ValidateUser(username, password)) { if (Roles.IsUserInRole("Saleman")) Response.Redirect("~/Saleman.aspx"); else if (Roles.IsUserInRole("Accountant")) Response.Redirect("~/Accountant.aspx"); else if (Roles.IsUserInRole("HR")) Response.Redirect("~/HR.aspx"); //Always receive Attempt to login failed message !! } } }
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: related to marquee & gridview
- Next Thread: Tag Prefix and Assembly error
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer c# c#gridviewcolumn checkbox class commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamic dynamically edit fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





