Geeks Talk

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.

Redirect user to different pages

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). ...

Go Back   Geeks Talk > Web Development > ASP.NET
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

ASP.NET ASP.NET and ASP Related Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-15-2007
Junior Member
 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
learnasp is on a distinguished road
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?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-19-2007
Junior Member
 
Join Date: Sep 2007
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
SoulBlight is on a distinguished road
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;
}
Reply With Quote
Reply

  Geeks Talk > Web Development > ASP.NET

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 08:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved