Configuration of Role authorization based on controls asp.net -


is there way configure section of aspx/ascx page, limiting controls in page user based on roles,something section level access can configured ?? if next time role has been given additional accesses view section not accessible before, can configure role instead of changing in code. can configured ?? in advance

you can through code:

panel.visible = roles.isuserinrole(..); 

or

panel.visible = this.user.identity.isinrole(".."); 

and when add them role, panel becomes visible. there's nothing built-in tie control role, , change it's visibility. however, it's easy code.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -