title: MVC3 multiple tabs returning partial view with different data
body: <p>I have few tabs in my view and have a partial view.</p>
  
  <p>Partial view contains a web grid. Depending on the selected tab grid has to be loaded with specific data.</p>
  
  <p>Using RenderAction to return partial view. But I am getting overflow exception when I post my view.</p>
  
  <p>This is my code.</p>
  
  <pre><code>&lt;div id="tabs"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#tabs-1"&gt;Sage Pay&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#tabs-2" &gt;Pay Pal&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div id="tabs-1"&gt;
          @{Html.RenderAction("SagePayPayments", "OrderProcessing");}
      &lt;/div&gt;
      &lt;div id="tabs-2"&gt;
          @{Html.RenderAction("PayPalPayments", "OrderProcessing");}
      &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>And my controller is </p>
  
  <pre><code>public ActionResult PayPalPayments()
      {
          var model = new OrderContext().GetNewPayments(PaymentType.PayPal);
          return PartialView("_PaymentsToVerify", model);
      }
  
      public ActionResult SagePayPayments()
      {
          var model = new OrderContext().GetNewPayments(PaymentType.SagePay);
          return PartialView("_PaymentsToVerify", model);
      }
  
      [HttpPost]
      public ViewResult VerifyPayments(FormCollection formData)
      {
          var context = new OrderContext();
          var orderIds = formData.GetValues("chkSelected");
          if (orderIds != null)
          {
              IList&lt;long&gt; selectedOrders = orderIds.Select(orderId =&gt; Convert.ToInt64(orderId)).ToList();
              context.VerifyPayments(selectedOrders);
          }
          return View("Unverified");
      }
  </code></pre>
  
  <p>Can somebody help me what I am missing.</p>
  
  <p>Thanks</p>