Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Login And redirect for specefic users

Reply
Thread Tools

Login And redirect for specefic users

 
 
SemSem
Guest
Posts: n/a
 
      02-04-2007
Helloz

iam working in a web application for univesity.

ihave diffrent kind of roles like:

1-Studetn Affairs 2-Staff

imake three sperate master pages for them.:
example:
1-SA.mastepage 2-Staff.masterpage 3-main.masterpage
and each one contain alot of child pages(home,add stydet,.....)

and i sperate Staff pages and student affiars pages in two folder


and when user go to the site he see the home pages is child for the main
master page wich contian some information adn a menu in the left has some
links
liks(about,login,inf about...,....,)

iwant when the user but clik the login links and go to the login pages and
enterd the password .

if his role is studenAffairs he redirect to the homewhich is child of
Sa.masterpage.
and if he is staff he goes to home for staff.masterpage.

itry this but it dosn't work

in event logged in of the login contorl:

protected void Login1_LoggedIn(object sender, EventArgs e)
{

if (User.Identity.IsAuthenticated)
{


if (User.IsInRole("Student Affairs"))
{

Response.Redirect(

"~/StudentAffairsFolder/home.aspx");
}

}

else if (User.IsInRole("Staff"))
Response.Redirect("~/staff/Default.aspx");

}

--
Islam Khalil,
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
redirect specefic user with specefic role to specefic pages ASP.ne SemSem ASP General 1 02-05-2007 07:55 AM
How does Hotmail login redirect to SSL automatically and then back? Jacob ASP .Net 0 07-08-2004 05:37 PM
How does Hotmail login redirect to SSL automatically and then back? Jacob ASP .Net 0 07-08-2004 05:30 PM
How does Hotmail login redirect to SSL automatically and then back? Jacob ASP .Net 0 07-08-2004 05:29 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM



Advertisments