title: Hidden Field not being sent in Form Collection asp.net MVC
body: <p>I have a couple Hidden form fields that are not being sent when I submit the form?  I use the Html Helpers to add the form the page...</p>
  
  <pre><code>&lt;%using (Html.BeginForm("UpdateXML", "PatientACO", new { template = (int)Model, PopPatId = TempData["POPPATID"]}, FormMethod.Post, new { name = "editTemp", id = "temp1" }))
  Response.Write("&lt;table width=\"500\" class=\"odd\"&gt;");
  Html.Hidden("encounter", encounter);
  Html.Hidden("AddEnc", encflag);
  Response.Write("&lt;/table&gt;");   %&gt;
  </code></pre>
  
  <p>Here is the method in my controller...</p>
  
  <pre><code>public ActionResult UpdateXML(int template, int PopPatId, FormCollection formCollection)
  {
      foreach (var key in formCollection.Keys)
      {
         if (key.ToString() == "deactivate")
         {
                        ((XmlElement)node.SelectSingleNode("//template/elements/element[@name=\"Active\"]")).SetAttribute("value", value);
             if (value == "N")
             {
                 dateIn = DateTime.Now.ToString("dd-MMM-yy");
             }                            
         }
         if (key.ToString() == "AddEnc")
         {
             if(formCollection[key.ToString()]=="ADDENC")
                              ((XmlElement)node.SelectSingleNode("//template/elements/element[@name=\"FOCUSED_READMISSIONS_ID\"]")).SetAttribute("value", "0");
         }
  
      }
  }
  </code></pre>
  
  <p>Those two If statements never hit.  Also, when I look at the formCollection Object, I can see that those two fields aren't in there.  How can I make sure that my hidden fields are submitted with the rest of the form?</p>