title: Dropdownlist onchange event in ASP.NET MVC not using AJAX
body: <p>I'm trying to make use of the onChange event for my dropdownlist in my ASP.NET MVC project, althought it is not working.</p>
  
  <p>The view, containing the form, looks like this:</p>
  
  <pre><code>@using (Ajax.BeginForm("Action", "Controller",
   new AjaxOptions
   {
       HttpMethod = "POST",
       UpdateTargetId = "pages",
       InsertionMode = InsertionMode.Replace
   }))
          {
              @Html.DropDownListFor(m =&gt; m.SelectedFrom, Model.ChangeFrom, new { onChange = "this.form.submit();" })                
          }
  
         &lt;div id="pages"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>With the code above, onChange fires when selecting an item in the dropdownlist as expected. Although it's not making use of ajax, it is simply redirecting me to a new page, instead of just updating/filling the "pages-Div".</p>
  
  <p>Although...</p>
  
  <p>If I <strong>delete</strong> the onChange event for the dropdownlist and <strong>add</strong> a simple submit button, like this:</p>
  
  <pre><code> @using (Ajax.BeginForm("SelectedUser", "ReplaceName",
   new AjaxOptions
   {
       HttpMethod = "POST",
       UpdateTargetId = "pages",
       InsertionMode = InsertionMode.Replace
   }))
          {
              @Html.DropDownListFor(m =&gt; m.SelectedFrom, Model.ChangeFrom)
              &lt;input type="submit" value="GO" /&gt;
          }
  </code></pre>
  
  <p>it uses Ajax and only reloads the "pages-Div".</p>
  
  <p>Am I missing something?</p>
  
  <p>Regards,
  Chris</p>