I've just started a project using ASP.NET MVC 3. I'm building on top of an existing object system, so one of the first things I have to do is define display and editor templates for the various types that exist.
Is it possible in MVC to define a DisplayTemplate with a generic argument? For example, we have a BitString<T>
class which takes an enumeration as the generic argument and represents a list of options wrapping the supplied enumeration. I'm hoping I can define a single Display/Editor template that handles all BitString instances.
I'm currently using Razor for my views, but I don't mind mixing and matching with ascx (or straight C# if there is a way to do it) to achieve this
Thanks
EDIT: I think this might be a dup of this question... But it's a year and a half old, so maybe someone has a better answer at this point? Generic partial view: how to set a generic class as model?