title: Client Side Validation for Hidden Input in ASP.NET MVC
body: <p>I'm still a bit novice to the ASP.NET MVC architecture.  I have an Edit page for data, which includes a hidden input.  After testing my page, the 'Save' button wasn't doing anything and after some research learned it was a client-side validation issue.</p>
  
  <p>After commenting the following line in the page:</p>
  
  <pre><code> @*@Html.HiddenFor(model =&gt; model.ID)*@
  </code></pre>
  
  <p>(where ID is a GUID), the page validated and posted.  </p>
  
  <p>From what I recall, the scaffolding put this code into my view.  I just need to know how to fix this so that the ID field gets sent back properly to the controller and wanted to know why it wasn't validating.</p>
  
  <p>Here is my View's code:</p>
  
  <pre><code>@using (Html.BeginForm()) 
  {
      @Html.ValidationSummary(true)
  
      &lt;fieldset&gt;
  
          &lt;div class="object_basics"&gt;
        @Html.HiddenFor(model =&gt; model.ID)
  
          &lt;div class="editor-label"&gt;
              @Html.LabelFor(model =&gt; model.Title)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.Title)
              @Html.ValidationMessageFor(model =&gt; model.Title)
          &lt;/div&gt;
  
  
         &lt;p&gt;
              &lt;input type="submit" value="Save" /&gt;
          &lt;/p&gt;
      &lt;/fieldset&gt;
  
  }
  </code></pre>