title: Submit form to action with parameters, Asp.Net.Core Mvc
body: <p>I am trying to submit sorting dropdown form  via ajax  in asp.net.core.  Action has other parameters which I want to get in action too but form does not submit other parameters.
  I think, the main  problem is form part  in razor </p>
  
  <p>this is part my action : </p>
  
  <pre><code>       public IActionResult Products( int? page,  int? categoryId, string searchName = "", string 
         sortOrder="")
         {
          int pageSize = 1;
          int pageNumber = (page ?? 1);
  
          ViewBag.SearchName = searchName;
          ViewBag.CategoryId = categoryId;
          ViewBag.SortOrder = sortOrder;
          ........
           model.ProductInfo = productList.ToList().ToPagedList(pageNumber, 
           pageSize);
        if (isAjax)
              return 
        PartialView("/Views/Shared/FrontPartialViews/_FrontProductList.cshtml", 
        model.ProductInfo);
          else
              return View("/Views/User/Products.cshtml", model);
          }
  </code></pre>
  
  <p>here is form :</p>
  
  <pre><code>            &lt;form asp-controller="User" asp-action="Products"  
                 asp-route- categoryId="@ViewBag.CategoryId" 
                 asp-route-searchName="@ViewBag.searchName"
                 data-ajax="true"
                 data-ajax-method="Get"
                 data-ajax-update="product"
                 data_ajax_mode="replace"&gt;
                    &lt;select name="sortOrder"  class="form-control" onchange="orderByChanged()"&gt;
                       &lt;option selected&gt; Please select one&lt;/option&gt;
                       &lt;option value="date_desc"&gt;
                       date_desc
                       &lt;/option
                    &lt;select&gt;
              &lt;/form&gt;
  </code></pre>