title: Unable To Access Hidden Values In .CS file
body: <p>I am stuckup with little problem </p>
  
  <p>I have the form contains 3 hidden controls, I am sending values through jquery. Upto this its working fine while I keep alert. </p>
  
  <p>I am using FormCollection and try to retrieve those hidden values in .cs file but I am unable to retireve those values. When I keep break point on FormCollections its showing all the hidden control names including key numbers.</p>
  
  <p>View:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td colspan ="2"&gt;
          @Html.Hidden("hdnddlid")
          @Html.Hidden("hdnrblMale")
          @Html.Hidden("hdnrblFeMale")
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $("input[name='Gender']").change(function () {
              if ($("input[name='Gender']:checked").val() == '1') {
                  hdnrblMale = "Male";
              }
              else if ($("input[name='Gender']:checked").val() == '0') {
                  hdnrblFeMale = "FeMale";
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Code in .cs file</p>
  
  <pre><code>public static void InsertPersonalDetails(PersonalDetails modelPersonal, FormCollection frmHdnValues)
  {
      try
      {
          PersonalDbContext db = new PersonalDbContext();
  
          string Male = frmHdnValues["hdnrblMale"].ToString();
          string Female = frmHdnValues["hdnrblFeMale"].ToString();
  
          db.Entry(modelPersonal).State = EntityState.Added;
          //pDetails.Add(Objpd);
          db.SaveChanges();
          // return pDetails;
      }
  </code></pre>
  
  <p>Thanks</p>