You can display pages in different ways by checking which user they are.
In my _Layout.cshtml, I have this:
@if (Request.IsAuthenticated && HttpContext.Current.User.IsInRole("Interviewer")) { <script type="text/javascript"> $("#logindisplay").show(); </script> <li>@Html.ActionLink("Forside", "Index", "Home")</li> <li>@Html.ActionLink("Spørgeskema", "Index", "Survey2")</li> <li>@Html.ActionLink("Brugere", "Index", "UserAdministration")</li> <li>@Html.ActionLink("Statistik", "Index", "Statistik")</li> <li>@Html.ActionLink("Vagtplan", "Vagtplan", "Statistik")</li> } @if (HttpContext.Current.User.IsInRole("Respondent")) { <li>@Html.ActionLink("Gammelt spørgeskema", "Index")</li> }
Etc.
You can create different DisplayTemplates for each kind of role and display them based on the role that the user has.
To manually assign roles to different users, use the ASP.NET configuration

From there, you can create your roles and manage users.
You do not want to do this in the long run if you get a lot of users on your site. Instead, when they create an account, you should automatically assign your role.
You can do this in your AccountController, like so:
if (createStatus == MembershipCreateStatus.Success) { Roles.AddUserToRole(model.UserName, "Respondent"); } ....
Your model may have a Role property instead of hardcoding.
Kenci source share