How to restrict access to certain actions in controller in ASP.net MVC

前端 未结 4 727
甜味超标
甜味超标 2020-12-29 16:33

I am new to ASP.net MVC and created my first web application using it. In my application I am using database authentication. I have created Login action in controller which

4条回答
  •  梦谈多话
    2020-12-29 16:48

    There are multiple ways of doing it but the preferred way would be to use the Annotation. Here is a post for it How to get custom annotation attributes for a controller action in ASP.NET MVC 4?

    If you are getting started I would suggest to follow the tutorial on http://www.asp.net/mvc

提交回复
热议问题