I want to add query string(s) to the end of an url using routes. How do I do this in Global.asax ?
routes.MapRoute(
"Detail",
"{controller}/{action}/{id}/{name}",
new
{
action = "Detail",
name = UrlParameter.Optional,
// it is possible to add here query string(s) ?
},
new[] { "MyProject.Controllers" }
);
For example, the actual url contains:
www.mysite.com/MyController/Detail/4/MyValue
but I want to generate something like:
www.mysite.com/MyController/Detail/4/MyValue?ref=test&other=something