title: Not able to set textarea and checkbox to set value in mvc5
body: <p>Hi I am trying to set my value in javascript + jquery in mvc 5 for textarea and checkbox but it is not working.</p>
  
  <p>My javscript code is as </p>
  
  <pre><code> document.getElementById("UpdatetxtDescription").value = "abc";       
   document.getElementById("UpdateActive").checked = true;   
  </code></pre>
  
  <p>my view page code is as </p>
  
  <pre><code>@Html.TextAreaFor(model =&gt; model.Description, new { htmlAttributes = new { @class = "form-control", id = "UpdatetxtDescription" } })
  @Html.CheckBoxFor(model =&gt; model.Active, new { htmlAttributes = new { @class = "form-control", id = "UpdateActive" } })
  </code></pre>
  
  <p>In console I am able to see </p>
  
  <pre><code>&lt;input data-val="true" data-val-required="The Active field is required." htmlattributes="{ class = form-control, id = UpdateActive }" id="Active" name="Active" type="checkbox" value="true"&gt;
  
  &lt;textarea cols="20" htmlattributes="{ class = form-control, id = UpdatetxtDescription }" id="Description" name="Description" rows="2"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>I can set value with id="Description" and id="Active" nut as I have 2 checkbox and 2 text area I can not make that id use because both the control have same id as decription for textarea and Active for checkbox</p>
  
  <p>2nd textarea and checkbox are as below whose Id I have set as different </p>
  
  <pre><code>@Html.TextAreaFor(model =&gt; model.Description, new { htmlAttributes = new { @class = "form-control", id = "txtDescription", rows = "3" } })
  @Html.CheckBoxFor(model =&gt; model.Active, new { htmlAttributes = new { @class = "form-control", id = "txtDescription" } })
  </code></pre>
  
  <p>but in console I can see there Id as </p>
  
  <pre><code>&lt;textarea cols="20" htmlattributes="{ class = form-control, id = txtDescription, rows = 3 }" id="Description" name="Description" rows="2"&gt;&lt;/textarea&gt;
  &lt;input data-val="true" data-val-required="The Active field is required." htmlattributes="{ class = form-control, id = txtDescription }" id="Active" name="Active" type="checkbox" value="true"&gt;
  </code></pre>