contoller Action Method public ActionResult Create() { // var userId = Convert.ToInt32(Session["Userid"]); if (UserServices.HasPermission(Permissions.Can_Add_User)) { var model = new UsersModel(); var RoleList = UserServices.GetRolesList(); ViewBag.RoleList = new MultiSelectList(RoleList, "id", "Name"); return View(model); } return RedirectToAction("NotAuthorize", "Error404"); }
Layout if (UserServices.HasPermission(Permissions.Can_Add_User)) { <a href="@Url.Action("List","User", new { area="Admin"})" class="nav-link"> class="far fa-circle nav-icon"> <p>User's</p> </a> }
(Namespace of application).UserServices userServices = new (Namespace of application).UserServices();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)