title: Does the [HiddenInput] attribute work, when using @Html.EditorForModel()?
body: <p>I marked the "ProductId" property with "HiddenInput" attribute:  </p>
  
  <pre><code>[HiddenInput(DisplayValue = false)]
  public int ProductId { get; set; }
  </code></pre>
  
  <p>When i use @Html.EditorForModel() in "Index" view, "ProductId" appeares on the screen. </p>
  
  <pre><code>@model SportStore.Domain.Entities.Product
  
  @using (Html.BeginForm())
  {
  @Html.EditorForModel()
  &lt;input class="AdminButton" type="submit" value="Save changes"/&gt;
  }
  </code></pre>
  
  <p>Although, when i use @Html.EditorFor() for each property, "ProductId" is hidden.  </p>
  
  <pre><code>@model SportStore.Domain.Entities.Product
  
  @using (Html.BeginForm())
  {
      @Html.HiddenFor(x =&gt; x.ProductId)
      &lt;nav&gt;Name: &lt;br/&gt;@Html.EditorFor(x =&gt; x.Name)&lt;br/&gt;&lt;/nav&gt;
      &lt;nav&gt;Description: &lt;br/&gt;@Html.EditorFor(x =&gt; x.Description)&lt;br/&gt;&lt;/nav&gt;
      &lt;nav&gt;Price: &lt;br/&gt;@Html.EditorFor(x =&gt; x.Price)&lt;br/&gt;&lt;/nav&gt;
      &lt;nav&gt;Category: &lt;br/&gt;@Html.EditorFor(x =&gt; x.Category)&lt;br/&gt;&lt;/nav&gt;
      &lt;input class="AdminButton" type="submit" value="Save changes"/&gt;
  }
  </code></pre>
  
  <p>So, @Html.EditorForModel() doesn't support [HiddenInput] attribute or i've made a silly :) mistake?    </p>
  
  <p>i found the same (but unanswered) question <a href="https://stackoverflow.com/questions/11052293/asp-net-hiddeninput-data-attribute-not-working-when-rendered-with-html-editorf?rq=1">here</a></p>