I have an ASP.NET MVC web application, and I\'ve registered a number of routes in my Global.asax.
I would like to know how I can programmatically build (generate a strin
You could use the UrlHelper class inside your controller action.
public ActionResult Index() { string address = Url.RouteUrl(new { action = "foo", controller = "bar", id = "123" }); // TODO: do something with the url return View(); }