c# - Creating an admin page in asp.net mvc 5 -


i started basic tutorial http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started .

i've added 2 roles in database table aspnetroles (yes db generated automatically)

now i'm looking tutorials create admin page. because don't know start. can of put me in right direction.

you start adding admincontroller , give actions.

you place [authorize] attribute above controller admins able access actions controller, similar below:

[authorize(roles = "admin, anotherrole")] public class admincontroller : controller {     public actionresult index()     {         return view();     } } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -