Explain Attribute Based Routing in MVC?

 Attribute based routing is used to manipulate the default behavior of routing in ASP.NET MVC.

Attribute-based routing in ASP.NET MVC is used to customize and control how URLs are mapped to controller actions and can deviate from the default routing behavior. By applying attributes directly to controllers and actions, you can define specific route templates, constraints, and names for your routes, giving you more control and flexibility over how URLs are structured and how they interact with your application's actions. This allows you to create more readable and specialized routing configurations to match the requirements of your web application.

http://localhost:1234/home/about


 

Post a Comment

Previous Post Next Post