Is there any way to have multiple actions with different parameters? I've seen it using the HttpPost
verbs flag, but it doesn't seem to work for me in other places.
The current request for action List
on controller type FoldersController` is ambiguous between the following action methods.
public ActionResult List()
{
//...
}
public ActionResult List(DateTime start)
{
// ...
}
public ActionResult List(string key)
{
// ....
}
Trying this Route Paramter I found on ...
I'm still a bit confused about how the routing works. This is what I have so far. http://stackoverflow.com/questions/894779/asp-net-mvc-routing-via-method-attributes
But I still get the ambiguous error. This doesn't make a lot of sense to me - they are two entirely different routes - it should know exactly which ActionResult to call forth. But it isn't doing that...
[UrlRoute(Path = "List/Days/{days}")]
[UrlRouteParameterConstraint(Name = "days", Regex = @"\d+")]
public PartialViewResult List(int days)
{
return PartialView("List", Folders.List());
}
[UrlRoute(Path = "List/Rings/{ring}")]
[UrlRouteParameterDefault(Name = "ring", Value = "all")]
public PartialViewResult List(string ring)
{
return PartialView("List", Folders.List());
}