TNWiki Article Spotlight – ASP.NET MVC User Role Base Menu Management


Dear All,

Welcome to TechNet Wiki Tuesday - TNWiki Article Spotlight.

Introduction

This is my first post for Tuesday Spotlight and today we are going to see about one of my article related to ASP.NET MVC and AngularJs .This article explains about ASP.NET MVC User Role Base Menu Management Using WEB API and AngularJS.

The reason why I have selected this article is we will see how to create and manage a User Role based Menu using ASP.NET MVC, WEB API and AngularJS.

Here we will see how to:

  1. ASP.NET Identity
  2. Menu management by Admin (Only Admin user can View All / Create /Delete and Edit Menu).
  3. Create Menu by User Role (Admin can create menu by selecting User Role)
  4. Show and Hide Dynamic Menu and Sub Menu by User Role
  5. Dynamically Display Menu by User Role (Here we have mentioned as Dynamic menu as in every page or in Master Page we will be loading menu from data base and display the menu to each user by their role)

Why we need to create a Dynamic Menu

If we are working on a simple web site creation with very few pages and only one programmer is working to create a website then in that case we can create a static menu and use it in our web site.

Let's now consider how we need to work for a big web application project. Let's consider development of an ERP Web application.

However, if more than two developers are working and perhaps the number of pages is greater than 50 to 100 then it will be hard to maintain a static menu.

And also there will be a greater chance of removing and adding a new menu item to the web project. For example, our client can ask to add 5 more new menus or remove 1 menu item. In such case it's difficult or hard to remove the menu and also for large web projects like ERP we need to display the menu depending on the user roles. If we use a static menu then it will be very difficult to manage the users for the menu.

To avoid all this we create a Menu Management with a User Role setting.

Who can manage the Menu?

This is a very important part since an Admin or Super Admin users can Add/Edit/Delete a Menu.

When an Admin is logged in he can add a new menu, edit an existing menu and delete a menu item to be displayed.

In this article we will see in detail how to create a CRUD (Insert/Update/Select and Edit) Menu by Admin User and display the Admin created Menu to Logged In user by their Role using ASP.NET MVC, WEB API and AngularJS.

Article Link:

If you are curios and want to read more about this articles, here is the link for you and another important fact is complete source code is available to download in the article link ASP.NET MVC User Role Base Menu Management Using WEB API And AngularJS

Note: Before starting this article, kindly go through my another article ASP.NET MVC 5 Security and Creating User Role  . It explains in detail about ASP.NET Identity and creating User Role.

 

Thank you all 

Your’s

Syed Shanu

MSDN Profile | MVP Profile | Facebook | Twitter |

Comments (4)

  1. pituach says:

    Congrats on you first "Tuesday Spotlight" post  
    Well done!

Skip to main content