Use role-based authentication, and then set the roles accordingly. Then you can do things like:
if (ViewContext.HttpContext.User.IsInRole("vEmployee") {
The advantage of this is that it has the basic functionality of ASP.NET - not even for MVC, so it will work with all possible membership providers.
Then you can add redundant view overloading for any control that you want to conditionally display:
public static string TextBox(this HtmlHelper helper, string name, string value, string role, object htmlAttributes) { if helper.ViewContext.HttpContext.User.IsInRole(role) { return helper.TextBox(name, value, htmlAttributes); } else { return null; } }
... and name it:
<%= Html.TextBox("name", "value", "vEmployee", null) %>
source share