0

I have an ASP.NET website for which I want to filter content based upon user Roles.
Say, for a "Manager" certain section displays and for an "Operations" guy, some other section is visible.
I don't want to use those If-else blocks in my UI throughout.
Is there any design guideline for separating my role based logic with my interface so that the controls automatically know when to be visible and when not?

I am familiar with the sitemap based restrictions.
I am looking for some best practices followed for this problem.

शेखर
  • 17,412
  • 13
  • 61
  • 117
Atishay
  • 1,026
  • 3
  • 11
  • 20

1 Answers1

0

For web forms you could use multi views which display a certain view depending on the role.

For MVC you could use child actions. Happy to provide more info if you require it.

timothyclifford
  • 6,799
  • 7
  • 57
  • 85