title: How to enable/Disable a drop down list , based on other drop down value
body: <p>I have the following two drop down lists inside my asp.net MVC web application:-</p>
  
  <pre><code>&lt;div&gt;
  
     &lt;span class="f"&gt;Role&lt;/span&gt;
  
       @Html.DropDownListFor(model =&gt;model.Server.RoleID, ((IEnumerable&lt;TMS.Models.TechnologyRole&gt;)ViewBag.TechRole).Select(option =&gt; new SelectListItem {
          Text = (option == null ? "None" : option.Name), 
          Value = option.RoleID.ToString(),
          Selected = (Model.Server != null) &amp;&amp; (option.RoleID == Model.Server.RoleID)
      }), "Choose...")
      @Html.ValidationMessageFor(model =&gt;model.Server.RoleID)
  &lt;/div&gt;
  &lt;div&gt;
     &lt;span class="f"&gt;Virtual Center&lt;/span&gt;
  
       @Html.DropDownListFor(model =&gt;model.Server.VirtualCenterID, ((IEnumerable&lt;TMS.Models.TMSServer&gt;)ViewBag.Servers).Select(option =&gt; new SelectListItem {
          Text = (option == null ? "None" : option.Technology.Tag), 
          Value = option.TMSServerID.ToString(),
          Selected = (Model.Server != null) &amp;&amp; (Model.Server != null) &amp;&amp; (option.TMSServerID == Model.Server.VirtualCenterID)
      }), "Choose...")
      @Html.ValidationMessageFor(model =&gt;model.Server.VirtualCenterID)
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I need the following:-</p>
  
  <ol>
  <li><p>To enable the Virtual Centre drop down list only if the Role drop down list value = “Virtual Server”.</p></li>
  <li><p>Incase the user deselect the “Virtual Server” values, to clear the selection for the Virtual center drop downlist and disable it.</p></li>
  </ol>
  
  <p>Can anyone advice how I can implement this ?</p>