title: how to get data using @Ajax.ActionLink() in ASP.net MVC
body: <p>i want get  data using @Ajax.ActionLink() method. i have tried in the following way<br>
  <strong>Create.chtml</strong><br><br></p>
  
  <pre><code> function UpdatePoDetails() {
  
      document.getElementById("poSearchbtn").href = "/MaterialReceivePO/SearchPO?searchID=" + document.getElementById('POID').value
  }
  @using (Ajax.BeginForm(new AjaxOptions
          {
              UpdateTargetId = "searchData",
              LoadingElementId = "loading"
          }
  
      ))
  {
    &lt;input id="POName" type="text" /&gt;
  
  
    @Ajax.ActionLink("Search", "SearchPO", null, new AjaxOptions
                                                          {
  
                                                              UpdateTargetId = "PoDetailsDiv",
  
                                                              HttpMethod = "GET" 
  
  
                                                          },
                                                new
                                                {
                                                    onclick = "UpdatePoDetails()" ,
                                                    id = "poSearchbtn"
                                                }
                              )
  
  
  
  }
    @using (Ajax.BeginForm(new AjaxOptions
          {
              UpdateTargetId = "MainBody",
              LoadingElementId = "loading"
          }))
       {
           &lt;div id="PoDetailsDiv"&gt;
            &lt;/div&gt;
        }
  </code></pre>
  
  <p><strong>Controller method</strong><br></p>
  
  <pre><code> public ActionResult SearchPO(string searchID)
      {
          int id = int.Parse(searchID);
          List&lt;PurchaseOrderDetailsModel&gt; podetails = (
  
                                                           from c in po.GetPoListDetails(id)
                                                           select new PurchaseOrderDetailsModel()
                                                           {
                                                               PoDetailsID = c.PoDetailsID,
                                                               ItemID = c.ItemID.Value,
                                                               Quantity = c.Quantity,
                                                               UnitPrice = c.UnitPrice,
                                                               TotalPrice = c.TotalPrice,
                                                               DiscountPer = c.DiscountPer,
                                                               FinalPrice = c.FinalPrice,
                                                               CurrencyID = c.CurrencyID,
                                                               ProductID = c.ItemID.Value,
                                                               ProductName = c.ProductName,
                                                               ProductCode = c.ProductCode,
                                                               Description = c.Description
                                                           }
                                                      ).ToList();
  
          return View("SearchPO",podetails);
      }
  </code></pre>
  
  <p><strong>SearchPO.chtml</strong><br></p>
  
  <pre><code>@model IEnumerable&lt;ERP_Web.Areas.Inventory.Models.PurchaseOrderDetailsModel&gt;
  
  &lt;table class="grid-table"&gt;
      &lt;tr&gt;
          &lt;th&gt;
              Product Name
          &lt;/th&gt;
          &lt;th&gt;
              Code
          &lt;/th&gt;
          &lt;th&gt;
              Quantity
          &lt;/th&gt;
          &lt;th&gt;
              Unit price
          &lt;/th&gt;
          &lt;th&gt;
              Total
          &lt;/th&gt;
          &lt;th&gt;
              Discount
          &lt;/th&gt;
          &lt;th&gt;
              Final price
          &lt;/th&gt;
          &lt;th&gt;
              Receive Quantity
          &lt;/th&gt;
      &lt;/tr&gt;
      @foreach (var item in Model)
      {
          &lt;tr&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.ProductName)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.ProductCode)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.Quantity)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.UnitPrice)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.TotalPrice)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.DiscountPer)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.DisplayFor(modelItem =&gt; item.FinalPrice)
              &lt;/td&gt;
              &lt;td&gt;
                  @Html.TextBox("reQuantity");
              &lt;/td&gt;
          &lt;/tr&gt;
      }
  &lt;/table&gt;
  </code></pre>
  
  <p>the poblem is when click on the Ajax link the it goes to the Controller. the controller code  executes well but at the end to does not Call the SearchPO View when returning. What is wrong in my Code or what i missing. Any help??</p>