S
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");
}
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");
}