title: How to set Id for EditorFor() html helper in asp .net MVC3
body: <p>I used this to override framework generated id <br/> <code>@Html.EditorFor(model =&gt; model.cost, new { id = "checkCost" })</code><br/>But unfortunately id is not changing. i.e <br/>When i use<br/> <code>string d = Request.Form["checkCost"];</code>
  <br/>at controller action then string filled with null value.<br/>WHY?? I also replaced EditorFor with TextBoxFor but nothing changed then also controller takes <strong>cost as ID</strong><br/></p>
  
  <pre><code>&lt;td &gt;
          @Html.DropDownList("check_master", "--select package--")
      &lt;/td&gt;
      &lt;td &gt;
          @Html.EditorFor(model =&gt; model.check_name)
          @Html.ValidationMessageFor(model =&gt; model.check_name)
      &lt;/td&gt;
      &lt;td &gt;
          @Html.EditorFor(model =&gt; model.cost, new { id ="checkCost" })
          @Html.ValidationMessageFor(model =&gt; model.cost)
      &lt;/td&gt;
  </code></pre>
  
  <p><br/><br/><strong>Updated:</strong><br/></p>
  
  <ul>
  <li>This is my partial view and my main view(rendering partial from ajax.actionLink) also hold a EditorFor(model=>mode.cost)</li>
  <li>Partial view is strongly typed to Check_master table and main view is strongly typed to package_master where both entitySet hold same name property i.e "COST" Secondly both partial and main view hold EditorFor "cost"<br/><br/>I tried to change the name of check_master property like by</li>
  <li>[Column("check_cost")]</li>
  </ul>
  
  <p>public Nullable cost { get; set; }<br/>But dont know why this is not working i.e property naem is not changing while referring it like </p>
  
  <pre><code>model.something 
  </code></pre>