Clear route data from Url.RouteUrl

274 views Asked by At

In a view, if I use

@Url.RouteUrl(MVC.Home.Actions.Foo())

where MVC.Home.Actions.Foo() is an ActionResult generated by T4MVC,

then I expect to get /foo (which is what I've defined via attribute routing)

but I actually get /foo?RouteValueDictionary=System.Web.Routing.RouteValueDictionary

How do I get the url that I want?

Incidentally, the action is as follows:

[HttpPost]
[Route("foo")]
public virtual ActionResult Foo(string bar) { /* ... */ }
0

There are 0 answers