title: ASP.NET MVC 3 Generic DisplayTemplates
body: <p>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.</p>
  
  <p>Is it possible in MVC to define a DisplayTemplate with a generic argument? For example, we have a <code>BitString&lt;T&gt;</code> 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.</p>
  
  <p>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</p>
  
  <p>Thanks</p>
  
  <p>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?
  <a href="https://stackoverflow.com/questions/875085/generic-partial-view-how-to-set-a-generic-class-as-model">Generic partial view: how to set a generic class as model?</a></p>