title: Pass javascript return value to controller in MVC 4
body: <p>In My MVC 4 Application i have a partial view. That contain a drop down list. when i change the drop down list, that value has to send the controller. But it is sending null value.
  How can i send the drop down value to controller.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Here is my code:</p>
  
  <p>Drop down list Code :</p>
  
  <pre><code>&lt;select name="ddSortByPrice" id="ddSort" onchange="this.form.submit(getComboA(this))")"&gt;
  &lt;option&gt;-- Sort By Price --&lt;/option&gt;
  @foreach (var item in ViewBag.SortingStatus){
  &lt;option value="@item.Value"&gt;@item.Text&lt;/option&gt;
  }&lt;/select&gt;
  </code></pre>
  
  <p>Javascript Code:</p>
  
  <pre><code>function getComboA(sel) {
      var value = sel.options[sel.selectedIndex].value;
           $.post('&lt;%= Url.Action("WhatsNewSortBy","RouteValue") %&gt;', new { value: val },        function(result) {
           // TODO: handle the success
           });
   }
  </code></pre>
  
  <p>Controller code:</p>
  
  <pre><code>public ActionResult WhatsNewSortBy(string value)
      {
          return RedirectToAction("WhatsNewOffers", "Product", new { @sortBy = value});
      }
  </code></pre>