Suma5566
asked on
control-level security in ASP.NET
hello,
i want to make a page and more than a user can access the same page.
but each user can see the controls on the page depending on its rule.
for example
user of rule "admin" can see the button "add user", "delete user" and "help"
while the user of rule "member" can see only the buttons "help"
so the page i want to build will have 3 buttons but each user will only see what he is supposed to see only.
any suggestions of the best mechanism to implement such a security??
thanks in advance :)
i want to make a page and more than a user can access the same page.
but each user can see the controls on the page depending on its rule.
for example
user of rule "admin" can see the button "add user", "delete user" and "help"
while the user of rule "member" can see only the buttons "help"
so the page i want to build will have 3 buttons but each user will only see what he is supposed to see only.
any suggestions of the best mechanism to implement such a security??
thanks in advance :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
but i was thinking of a different solution, if you or another person may help me with it.
the idea is.....for example button "help" has property called "AllowedUsers" and this property can hold more than one value, lets say "Admin" and "Marketing".
for example, lets assume this code:
foreach(control cn in page.Controls)
{
if(con.AllowedUsers.contai
con.visible=true;
else
con.visible = false;
}
I'm guessing if there is someway to implement it this way?