Link to home
Start Free TrialLog in
Avatar of shanemay
shanemayFlag for United States of America

asked on

Change a page based on a user's profile.

I am looking for best practices or a solution on how to change a page based on a logged in users profile.  I am able to authenticate users against our LDAP and pull their group membership information, however, what is the best way to change the page based on their group membership information.  For example, I have a set of buttons, and only certain user groups should see certain buttons.  I am not sure of the best way to proceed.  My application is written in C# with a SQL server back end.  

ASKER CERTIFIED SOLUTION
Avatar of pr0t0c0l12
pr0t0c0l12

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm not sure how C# exactly works but with principle couldn't you simple use variables and change their data with an SQL query?

I mean structure the page as you would. Perform an SQL query with the user id of the logged in user or through the url. Put some variables in the page and set their data to that of your query.

Sorry if this is completely useless to you, or doesn't make much sense.
Avatar of pr0t0c0l12
pr0t0c0l12

This is VB code but surely gives you a baseline to start on your c# code.  You might ask in their forums to see if they have the c# version.  

Overall asp.net will let you control what you want users to see based on their permissions and roles.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shanemay

ASKER

Thank you for the feedback and advice.