Click here to Skip to main content
16,008,750 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

"Al Salam 3alaykom"

I have a project developing it using VB.NET , I hope you can help me.

the project is a college portal where we have two roles "students" and "teachers"

my question is how we can let each role see the same pages BUT with different contents.

For example : we have GRADE PAGE if the student access this page he will see his grades BUT if the teacher access this page he will be able to post the grades for the student.
Posted

You can user the role and build conditional logic to change what the role is or is not allowed to view.

See this page as an introduction to roles;
http://www.asp.net/security/tutorials/assigning-roles-to-users-cs[^]

[Edit]
Sorry the content above relates to ASP web applications, you tagged this as vb.net you can achieve the same thing in a similiar way if you are referring to winforms.
 
Share this answer
 
v2
hello

your query is very simple friend in ASP.NET you can use the website administration control to set the roles and then use login view control to do this magic for you, the student and teacher will be diverted to the same page but when a student will login he will get a different view and vice versa

go for this link to get the basic assumptions
Login Control

and hers your login view controls description friend

Login View

Do rate my answer once u find it useful

Thanks & Regards
Radix
 
Share this answer
 
I think the best thing to do would be to assign a security level to each role, and then create 2 forms. One for students and one for teachers. Then you can display the correct form depending on the current users security level.

Happy Coding
 
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