title: Load partial view depending on dropdown selection in MVC3
body: <p>Im trying to create a from using asp.net mvc3.</p>
  
  <p>I have a dropdownlist with some options. 
  What i want is different partial views to be injected into the page, depending on the selection in the dropdown list.</p>
  
  <p>But. i dont want this to rely on a submit action. It should function so that, the partial view is loaded as soon as you select from the select list. </p>
  
  <p>I have this code:</p>
  
  <pre><code>@using (Ajax.BeginForm("Create_AddEntity", new AjaxOptions { 
      UpdateTargetId = "entity_attributes", 
      InsertionMode = InsertionMode.Replace
      }
  ))
  {
          &lt;div class="editor-label"&gt;
              @Html.Label("Type")
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.DropDownList("EntityTypeList", (SelectList)ViewData["Types"])
          &lt;/div&gt;
  
          &lt;div id="entity_attributes"&gt;&lt;/div&gt;
          &lt;p&gt;
              &lt;input type="submit" value="Create" /&gt;
          &lt;/p&gt;
  }
  </code></pre>
  
  <p>But I can't figure out how to trigger this partial view load when the dropdown list selection changes.</p>
  
  <p>This point is that the form is different for the different "entity types". so there will be loaded a different partial view, depending on the dropdown selection.</p>
  
  <p>Anyone got any pointers?</p>