---
title: "Explain What is routing in MVC? What are the three segments for routing important?"  
description: "Explain What is routing in MVC? What are the three segments for routing important?"  
author: "Manish Kumar"  
published: 2017-05-14  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/23244/explain-what-is-routing-in-mvc-what-are-the-three-segments-for-routing-important  
category: "c#"  
tags: ["mvc5"]  
reading_time: 2 minutes  

---

# Explain What is routing in MVC? What are the three segments for routing important?

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

## Answers

### Answer by Manish Kumar

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


---

Original Source: https://www.mindstick.com/interview/23244/explain-what-is-routing-in-mvc-what-are-the-three-segments-for-routing-important

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
