Cannot call action method 'System.Web.Mvc.PartialViewResult Foo[T](T)' on controller 'Controller' be
- by MedicineMan
Cannot call action method 'System.Web.Mvc.PartialViewResult FooT' on controller 'Controller' because the action method is a generic method
<% Html.RenderAction("Foo", model = Model}); %>
Is there a workaround for this limitation on ASP MVC 2? I would really prefer to use a generic. The workaround that I have come up with is to change the model type to be an object. It works, but is not preferred:
public PartialViewResult Foo<T>(T model) where T : class
{
// do stuff
}