redirect specefic user with specefic role to specefic pages ASP.ne

redirect specefic user with specefic role to specefic pages ASP.ne

am 04.02.2007 05:44:00 von SemSem

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,
--
Islam Khalil,

Re: redirect specefic user with specefic role to specefic pages ASP.ne

am 05.02.2007 08:55:31 von Mike Brind

"SemSem" wrote in message
news:3DBBE153-0AAA-4714-A795-728F41390480@microsoft.com...
> 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)
> {

This group covers classic asp. ASP.Net is totally different. Try
microsoft.public.dotnet.framework.aspnet