title: jquery for Cascading Dropdown in MVC3
body: <p>I'm working in Asp.net MVC3. I'm using two <code>DropdownList</code> which are <strong>Vertical</strong> and <strong>Account</strong>. Based on the selection of Vertical, Account <code>DropdownList</code> should get visible and populated with data according to the Vertical selection. How could do this using <strong>JQuery</strong>?  </p>
  
  <p>I'm using following code and got the Accountvalues based on the selection of Vartical. What I have to give in success function of Ajax call to make the Account <code>DropdownList</code> visible and populated with values.</p>
  
  <pre><code>$(document).ready(function () {
      $("#vertical").change(function (e) {
          var vertical = $("#vertical").val();
          cascadingdropdown(vertical);
      });
  });
  
  
  function cascadingdropdown(vertical) {
      $("#account").empty();
      $("#account").append("&lt;option value='0'&gt;&lt;/option&gt;");
  
      $.ajax({
          url: '@Url.Action("Account","Home")',
          dataType: 'json',
          data: {
              vertical: vertical
          },
          success: function (data) {
  
          }
      });
  }
  </code></pre>