title: Rendering the field name in an EditorTemplate (rendered through EditorFor())
body: <p>I'm currently building the Admin back-end for a website in ASP.NET MVC.</p>
  
  <p>In an ASP.NET MVC application, I've started using the 'EditorFor' helper method like so:</p>
  
  <pre><code>&lt;div id="content-edit" class="data-form"&gt;
      &lt;p&gt;
          &lt;%= Html.LabelFor(c =&gt; c.Title) %&gt;
          &lt;%= Html.TextBoxFor(c =&gt; c.Title)%&gt;
      &lt;/p&gt;
      &lt;p&gt;
          &lt;%= Html.LabelFor(c =&gt; c.Biography) %&gt;
          &lt;%= Html.EditorFor(c =&gt; c. Biography)%&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the model, the 'Biography' field has been decorated with: [UIHelper("Html")].</p>
  
  <p>I have an 'Html' partial view (under Views/Shared/EditorTemplates):</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;System.XML.Linq.XElement&gt;" %&gt;
  
  &lt;textarea class="html"&gt;
      &lt;%= Model.ToString() %&gt;
  &lt;/textarea&gt;
  </code></pre>
  
  <p>Now I'd like to have the 'ID' attribute of the 'textarea' set to the name of the field, like this:</p>
  
  <pre><code>&lt;textarea id="Biography" class="html"&gt;
      ...
  &lt;/textarea&gt;
  </code></pre>
  
  <p>But I can't see a way to do that with the current set up.</p>
  
  <p>All I can think of is creating an 'Html' ViewModel that contains a 'Value' property and a 'ControlID' property.</p>
  
  <p>But if I based the view off that, rather than 'System.XML.Linq.XElement', it would no longer be compatible with the 'EditorFor' helper method and I'd have to do everything manually.</p>
  
  <p>Has anyone had a similar problem yet?</p>