missellorin
missellorin

Reputation: 389

Create dynamic menus and assign roles to user c# asp.net

I am fairly new to programming c# and asp.net. I am asked to create menus and restict users. I found this solution http://www.c-sharpcorner.com/uploadfile/4d9083/creating-custom-role-manager-with-dynamic-menus-in-asp-net/ but it doesn't seem to fit in. What I like is an app that create menus and restrict users from seeing it. For example, I created Home, Products, Store, About. Admins can view all the menu while users are restricted to view Products. Please help me :( Give me some links or full code, if possible. TIA

Upvotes: 1

Views: 1254

Answers (1)

developergg
developergg

Reputation: 857

At first you should have a table where you can insert users with their permissions. And then you should have a table for menus where you should have user_id, menu and so on.

On load of page you can join two tables and get appropriate menus.

Upvotes: 1

Related Questions