top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is Attribute Routing in ASP.Net MVC?

0 votes
432 views
What is Attribute Routing in ASP.Net MVC?
posted Sep 30, 2016 by Latha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

ASP.NET Web API supports this type routing. This is introduced in ASP.Net MVC5. In this type of routing, attributes are being used to define the routes. This type of routing gives more control over classic URI Routing. Attribute Routing can be defined at controller level or at Action level like :

[Route("{action = TestCategoryList}")] - Controller Level
[Route("customers/{TestCategoryId:int:min(10)}")] - Action Level
answer Sep 30, 2016 by Shivaranjini
...