473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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

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,
Feb 4 '07 #1
1 1657

"SemSem" <Se****@discussions.microsoft.comwrote in message
news:3D**********************************@microsof t.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
Feb 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hoover_richard | last post by:
I am trying to develop a website and the website runs fine on my development server, but when I upload the site to the server I have problems with the redirection based on the user role once a user...
3
by: Tom | last post by:
Hi, I have an index.aspx page which includes top.aspx, left.aspx, main.aspx and bottom.aspx. In the left.aspx, there is a login web control - login.ascx. It keeps session of username and role...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
2
by: Q. John Chen | last post by:
All, I am using Form Authentication with Roles. E.G. PageA.aspx is permitted for Role "Admin", and PageB.aspx is permitted for Role "Basic". When a user of "Basic" role try to access an...
4
by: Brian Lowe | last post by:
I'm using Forms authentication with my user data in a SQL db. I have pages in the main appliaction folder accessible to anonymous users and I've set security to deny annonymous users access to...
0
by: Trollpower | last post by:
Hello NG, Ive got authentication mode Forms activated in web.config. Now I have also 2 pages. Page 'A' needs role '1' to be accessed while page 'B' needs role '2' to be accessed. When the user...
6
by: Coleen | last post by:
Hi all :-) I need to redirect to multiple pages on click of a transmit button, without redisplaying each page. This redirection is to capture session variables that are created on each page and...
0
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
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:
2
by: JJ | last post by:
Just wondering what approach you more experienced developers take here: I am writing a basic cms system to add pages to a site. One function I want to add is to limit access to a new page on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.