Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all,

I want to make a web page that changes its design (layouts, panels, css..) based on the logged in user, for example : some menus may appear , other may disappear , or a group of tabs also , and also the page layout. In my case , I want to build an academic portal for students and teachers , and all of them should log into the system , and then get redirected to the same page (eg: main) but they should see different design in the same page according to the logged in user.

how can I achieve this job ?

thanks in advance :)
Posted
Comments
Sergey Alexandrovich Kryukov 26-Mar-14 19:12pm    
By using ASP.NET. This is the whole point of any server-side technology: content is generated on the fly based on some data which can describe any kinds of condition. I don't understand what may need an expert's advice: this is just the regular work with the use of the server-side technology.
—SA
ZurdoDev 26-Mar-14 21:58pm    
You have to write the code. There is no magic way to do it.

Please see my comment to the question. And start here: http://www.asp.net/get-started[^]. Yes, I'm serious. :-)

—SA
 
Share this answer
 
Comments
ALNAJJARALI 26-Mar-14 19:31pm    
Hi Sergey, my problem is in the page design process, not in the coding technology .
suppose I want a tab to appear for student and to disappear for teacher . I want to change the whole design, how to achieve this -if you know- ?
Sergey Alexandrovich Kryukov 26-Mar-14 19:37pm    
Those things are related. I am not talking about "coding technology" (what is that?), but programming technology.

I could probably tell you how to change the design if I could see your current design. Can you finally see the point? You are asking about some things which are done almost everywhere, are very usual. How can I know what could you probably miss? You face just the design job to be done. At this point, you don't need any expert's advice (assuming that you understand the technology), you just need to take your requirements, analyze them, start designing... If you face any problems, we will gladly help you.

—SA
The easiest way would be retrieving the Role of Logged In User like teacher or student. To store the Role of User, you could add a new Column to the User Table or create two new Tables like...
  • UserRole Table (UserId, RoleId)
  • Role Table (RoleId, RoleName)

Then in Code Behind of the Page, which is loaded after Login, check the Role and change the design accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900