开发者

Need the best approch to show a group of server control according to its permission

Suppose I have a page which have more that 50 asp.net server controls. Now I want to display some control according to the logged in user's permission and rest of the controls will be hidden. In the same way, if an another user logs in then according to his/her permission it will show another group of controls on that page.

So what is the best way to do the same in as开发者_运维百科p.net?


If you're using a RoleProvider of some description for the roles a LoginView control would do the trick.


We have something like this that we built at my work. Essentially it's a table with logins, permission and a boolean value. When our pages load it goes through and does a check for permissions for each control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜