Routing is how ASP.NET MVC matches a URI to an action. MVC 5 supports a new type of routing, called attribute routing . As the name implies, attribute routing uses attributes to define routes. Attribute routing gives you more control over the URIs in your web application. The earlier style of routing, called convention-based routing, is still fully supported. In fact, you can combine both techniques in the same project. This post will cover the basic features and options of Attribute Routing, in ASP.NET MVC 5. Why Attribute Routing? Enabling Attribute Routing Optional URI Parameters and Default Values Route Prefixes Default Route Route Constraints Custom Route Constraints Route Names Areas Why Attribute Routing? For example, a socially enhanced...(read more)
Go to the complete details ...