piyushc:Depending on the user role, I need to show/hide some part of the page and even set properties of the controls.
This has led to n number of if-else statements in my aspx page which does not smell good.
You need to create a Permissions utility class, with a method like : bool HasAccess(ActionEnum action, User user)
You can divide your system objects into Actions, like ShowHeader, ShowFooter etc.
Each user will have its own permission set, and this utility function will check the user's role and associate it with the relevant permission to return true or false based on if the user has permission to perform that action or not.
Hope this helps,
Vivek