title: Multiple forms in one view page
body: <p>I'm working on an application that handles employee's profile. </p>
  
  <p>I have 3 forms (all in the same controller) in a single view page, but it only saves the 1st form. And when i save the 2nd form, it clears the values of the 1st and 3rd form.</p>
  
  <p>Here is my code: </p>
  
  <p><strong>Views/EMPs/Index:</strong></p>
  
  <pre><code>@using (Html.BeginForm("Edit", "EMPs", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
      &lt;div class="form-group"&gt;
          &lt;div class="pull-right"&gt;
              &lt;input type="submit" value="Update" name="personalsubmit" class="btn btn-success" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  
  @{ Html.RenderAction("Index", "EMP_REFERENCE", new { id = Model.eMP.lineno });}
  
  @using (Html.BeginForm("Edit", "EMPs", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
      &lt;div class="form-group"&gt;
          &lt;div class="pull-right"&gt;
              &lt;input type="submit" value="Update" name="jobsubmit" class="btn btn-success" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  
   @{ Html.RenderAction("Index", "EMP_BENEFITS", new { id = Model.eMP.lineno });}
  
  @using (Html.BeginForm("Edit", "EMPs", FormMethod.Post, new { enctype = "multipart/form-data" }))
  {
      &lt;div class="form-group"&gt;
          &lt;div class="pull-right"&gt;
              &lt;input type="submit" value="Update" name="otherssubmit" class="btn btn-success" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p><strong>EMPsController</strong></p>
  
  <pre><code> public ActionResult Edit([Bind(Include = "lineno,EMPNO,IDNO..")] EMP eMP)
          {
              if (ModelState.IsValid)
              {
                  if (Request.Form["personalsubmit"] != null)
                  {
                      db.Entry(eMP).State = EntityState.Modified;
                      db.SaveChanges();
  
                  }
                  if (Request.Form["jobsubmit"] != null)
                  {
                      db.Entry(eMP).State = EntityState.Modified;
                      db.SaveChanges();
  
                  }
                  if (Request.Form["otherssubmit"] != null)
                  {
                      db.Entry(eMP).State = EntityState.Modified;
                      db.SaveChanges();
  
                  }
  
                  return Redirect(Request.UrlReferrer.PathAndQuery);
              }
              return View(eMP);
         }
  </code></pre>
  
  <p>I couldn't put them all in one form, because i used an ajax beginForm between them for another crud method. Since I've read that nested forms are not recommended.</p>
  
  <p>Is there a way to save one form without it clearing the values of the other forms?</p>