Connecting Tech Pros Worldwide Forums | Help | Site Map

[Asp.net]: master page content hiding for different users

Newbie
 
Join Date: Aug 2008
Posts: 10
#1: Oct 8 '08
Hi friends,

I designed one master page in my application.
Here i am stuck up with hiding the content for the different users login.
If the login user is Admin he needs to see some content and for other users they can not see that content.
How can i hide the content of master page for specific login user.
thank you.

kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,745
#2: Oct 8 '08

re: [Asp.net]: master page content hiding for different users


Use .net membership to identify s/he, user identity. Then you can set links to false and make them visible if admin logs in.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#3: Oct 8 '08

re: [Asp.net]: master page content hiding for different users


Or you could create different master pages for each group of users if the content is sensitive.
Newbie
 
Join Date: Aug 2008
Posts: 10
#4: Oct 10 '08

re: [Asp.net]: master page content hiding for different users


Quote:

Originally Posted by Frinavale

Or you could create different master pages for each group of users if the content is sensitive.

I want to use only single master page for all the users.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#5: Oct 10 '08

re: [Asp.net]: master page content hiding for different users


Quote:

Originally Posted by sandeepsangshetty

I want to use only single master page for all the users.

Then in the master page code you will have to check the current user and determine what controls should be made available to them.
Reply