title: Why is my editor template ignored when I call EditorForModel?
body: <p>I have a class called <code>LocalizedString</code> that is defined in an external library that is referenced in my asp.net mvc 3 project.</p>
  
  <p>I have created an editor template called <code>LocalizedString.cshtml</code> in the <code>~\View\Shared\EditorTemplates</code> folder.</p>
  
  <p>I have the following model</p>
  
  <pre><code>public class Region
  {
      public LocalizedString Title { get; set; }
  }
  </code></pre>
  
  <p>I have the following test page:</p>
  
  <pre><code>@model Region
  
  @Html.EditorForModel()
  @Html.EditorFor(x =&gt; x.Title)
  </code></pre>
  
  <p>The editor template for <code>LocalizedString</code> is not invoked when I call <code>EditorForModel</code>, but it does render when i explicitly call <code>EditorFor(x =&gt; x.Title)</code> so I know that I don't have referral problems.</p>
  
  <p>Why is my editor template ignored when I invoke <code>EditorForModel</code> (or its equivalent <code>EditorFor(x =&gt; x)</code>)</p>
  
  <p><strong>Updates</strong></p>
  
  <p>I created a new project to reproduce this behavior. I just used the default ASP.NET MVC 3 Internet Application.</p>
  
  <p><em>Index.cshtml</em></p>
  
  <pre><code>@model MvcApplication1.Models.Region
  @{
      ViewBag.Title = "Home Page";
  }
  
  &lt;h2&gt;@ViewBag.Message&lt;/h2&gt;
  &lt;p&gt;
      To learn more about ASP.NET MVC visit &lt;a href="http://asp.net/mvc" title="ASP.NET MVC Website"&gt;http://asp.net/mvc&lt;/a&gt;.
  &lt;/p&gt;
  
  @Html.EditorForModel()
  </code></pre>
  
  <p><em>HomeController.cs</em></p>
  
  <pre><code>using System.Web.Mvc;
  using MvcApplication1.Models;
  
  namespace MvcApplication1.Controllers
  {
      public class HomeController : Controller
      {
          public ActionResult Index()
          {
              ViewBag.Message = "Welcome to ASP.NET MVC!";
  
              return View(new Region());
          }
      }
  }
  </code></pre>
  
  <p><em>Region.cs</em></p>
  
  <pre><code>namespace MvcApplication1.Models
  {
      public class Region
      {
          public Region()
          {
              this.Name = "RegionInstance";
              this.Title = new LocalizedString();
          }
  
          public string Name { get; set; }
  
          public LocalizedString Title { get; set; }
      }
  }
  </code></pre>
  
  <p><em>LocalizedString.cs</em></p>
  
  <pre><code>namespace MvcApplication1.Models
  {
      public class LocalizedString
      {
          public LocalizedString()
          {
              this.Name = "LocalizedStringInstance";
          }
  
          public string Name { get; set; }
      }
  }
  </code></pre>
  
  <p>If you run this program, the output will only display a text input for the name of the region. The <em>LocalizedString.cshtml</em> content is never output.</p>
  
  <p>I also tried to use <code>UIHint</code> over the <code>Region.Title</code> property, but it still does not display.</p>