Home > DeveloperSection > Forums > How to change url using url routing in mvc?
Manoj Pandey

Total Post:26

Posted on    February-21-2015 5:46 AM

 ASP.NET MVC Url Rewriting  Url Routing  Routing 

 1 Reply(s)
 820  View(s)
Rate this:

Hi I’m working with url routing.

My question is my actual controller is Home and action is Index when run application give the appropriate result that time url is Home/Index.

But I’m want to when type url Dashboard/Index that time execute Home controller index method.

How to possible.

Thank you in advance.

Tom Cruser
Tom Cruser

Total Post:28

Posted on    February-21-2015 6:16 AM

Just add this route in RouteConfig.cs file make sure to add this before default route otherwise this is not work.


                 name: "OldURL",

                 url: "Dashboard/{action}/{id}",

                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }


Don't want to miss updates? Please click the below button!

Follow MindStick