Routing define Url pattern and handler information. It is a mechanism to process the incoming url that is more descriptive and give desired response. It is the URL pattern that is mapped together to a handler and routing is responsible for incoming browser request for particular MVC controller. We can also say that routing help you to define a URL structure and map the URL with controller.
Routing are of two types (after the introduction of ASP.NET MVC5)
Convention based routing: We can call MapRoute method and set its unique name, this url pattern and specify some default values.
Attribute based routing: In attribute based routing we specify the Route attribute in the action method of the controller.
There are three segments for routing that are important
1-ControllerName
2-ActionMethodName
3-Parammeter
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Routing define Url pattern and handler information. It is a mechanism to process the incoming url that is more descriptive and give desired response. It is the URL pattern that is mapped together to a handler and routing is responsible for incoming browser request for particular MVC controller. We can also say that routing help you to define a URL structure and map the URL with controller.
Routing are of two types (after the introduction of ASP.NET MVC5)
Convention based routing: We can call MapRoute method and set its unique name, this url pattern and specify some default values.
Attribute based routing: In attribute based routing we specify the Route attribute in the action method of the controller.
There are three segments for routing that are important
1-ControllerName
2-ActionMethodName
3-Parammeter