title: Shared Editor Templates based on property names?
body: <p>In an ASP.net MVC 4 web application, I have 5 model classes that all have the same property, say <code>string ManufacturerName</code>. I want to present a dropdown list of Manufacturers from the database(list data passed from controller to view using <code>ViewBag</code>) in the create/edit templates of these models. It is possible to do it but I am repeating the dropdown code in all the 5 Editor Templates</p>
  
  <pre><code>@Html.DropDownList("ManufacturerName", new SelectList(ViewBag.ManufacturerList))
  </code></pre>
  
  <p>I was hoping there is some way to just write the above dropdown code once in an Editor Template called "Manufacturer.cshtml" as a partial view and be able to call it from the model templates like so </p>
  
  <pre><code>@Html.EditorForModel(model =&gt; model.ManufacturerName)
  </code></pre>
  
  <p>I know above line would normally call an editor template for <code>string</code> since that's the type of <code>ManufacturerName</code> but is there a way to change it to match the property name instead? </p>