---
title: "Dynamic MVC Routing  in asp.net mvc"  
description: "Dynamic MVC Routing  in asp.net mvc"  
author: "Anonymous User"  
published: 2014-11-09  
updated: 2014-11-10  
canonical: https://www.mindstick.com/forum/2547/dynamic-mvc-routing-in-asp-dot-net-mvc  
category: "asp.net mvc"  
tags: ["mvc"]  
reading_time: 1 minute  

---

# Dynamic MVC Routing  in asp.net mvc

I have [Controller](https://www.mindstick.com/blog/273/passing-values-from-controller-to-view-in-asp-dot-net-mvc) [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide): About and [Action](https://www.mindstick.com/forum/155752/what-is-action-result-with-its-types) name: [Index](https://www.mindstick.com/blog/198/index-in-sql-server). But I want the [URL](https://www.mindstick.com/forum/436/url-redirection) to be like this (action name will be dynamically)

www.example.com/[home](https://www.mindstick.com/articles/126322/how-to-keep-your-home-safe-while-traveling)/aaa www.example.com/home/bbb www.example.com/home/ccc

**[Routing](https://www.mindstick.com/articles/11998/attribute-routing-in-asp-dot-net-mvc)**

```
  routes.MapRoute(                name: "Home",                url: "{controller}/{name}",                defaults: new { controller = "Home", action = "Index"}
```

**Controller**

```
public class AboutController : Controller    {        public ActionResult Index(string name)        {            return View();        }    }}
```

**[View](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view)**

```
@{    ViewBag.Title = "Index";}<h2>Index About</h2>
```

## Replies

### Reply by Barbara Jones

This should work.

```
routes.MapRoute(    name: "Home",    url: "Home/{name}",    defaults: new    {        controller = "Home",        action = "Index"    });
```

Make sure your default route exists and comes after About route


---

Original Source: https://www.mindstick.com/forum/2547/dynamic-mvc-routing-in-asp-dot-net-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
