Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Redirect user to different pages within the ASP.NET forums, part of the Web Development category; I am using Login control provided in the framework for my website. I want to redirect user to different pages based on roles ( using the ASP. Net Membership Provider). ...
|
|||||||
|
|||
|
Redirect user to different pages
I am using Login control provided in the framework for my website. I want to redirect user to different pages based on roles ( using the ASP. Net Membership Provider). I tried doing that in the LoggedIn event however the user in the LoggedIn event does not get updated. It always shows empty string on first login. How to take care of that?
|
| Sponsored Links |
|
|||
|
Re: Redirect user to different pages
You can ovveride Login component Authentificate Event for yourself
something like this ... protected void login_Authenticate(object sender, AuthenticateEventArgs e) { if (Membership.ValidateUser(login.UserName, login.Password)) { e.Authenticated = true; if (Roles.IsUserInRole("some role 1")) login.DestinationPageUrl = "some url1"; else if (Roles.IsUserInRole("some role 2")) login.DestinationPageUrl = "some url 2"; } else e.Authenticated = false; } |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Number of pages passed and pages/sec | JobHelper | LoadRunner | 3 | 01-07-2008 01:44 AM |
| Capture SSL Pages | jalaramu | LoadRunner | 1 | 09-06-2007 11:43 AM |
| how to link jsp pages | banjali | JSP | 3 | 06-15-2007 08:11 AM |
| Redirect to week.php instead of login.php | Geek_Guest | PHP | 0 | 05-16-2007 02:10 PM |
| Total no. pages and pages passed/sec | JobHelper | LoadRunner | 1 | 01-12-2007 05:00 PM |