title: Asp mvc5 dropdownlist ajax result
body: <p>I want to show values selected in the dropdown list in a certain Div, I have this code below:</p>
  
  <pre><code>&lt;select id="SelectedItem"&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;script&gt;
  $('#SelectedItem').change(function(){
      $.ajax({
          url: '@Url.Action("ajaxGetValue", "Test")',
          type: "POST",
          data: {id:$('#SelectedItem:selected').val()},
          success: function(){
              $('#ajaxDisplay').html('...');
      }
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>and in the controller side I have:</p>
  
  <pre><code>   public PartialViewResult ajaxGetValue(int id)
      {
          ViewBag.str = id.ToString();
          return PartialView("Student");
      }
  </code></pre>
  
  <p>I want to show my result here:</p>
  
  <pre><code>&lt;div id="ajaxDisplay"&gt;
  </code></pre>
  
  <p>but it just gives no results</p>