title: Enabling the second and third dropdownlistfor based on the value of first dropdownlistfor in MVC
body: <p>I have three DropDownLists. If a specific Value from my first DropDownList is chosen, the second Dropdownlist should be enabled. Example, if "Player 3" has been choosen, the other two DropDownList should be enabled, though, if "Player 2" is chosen the last DropDownList should be disabled and the second one enabled. </p>
  
  <p>How can I easily do this? I am using MVC 3 EF model first.
  This is my code in my view:</p>
  
  <pre><code> &lt;p&gt;Player&lt;/p&gt;
       &lt;div class="editor-field"&gt;
          @Html.DropDownListFor(m =&gt; m.PlayerName,Model.SubjectTypes, "Choose player" , new { @class = "selectstyle" })
          @Html.ValidationMessageFor(model =&gt; model.PlayerName)
      &lt;/div&gt;
  
      &lt;p&gt;Position&lt;/p&gt;
      &lt;div class="editor-field"&gt;
          @Html.DropDownListFor(model =&gt; model.PositionName, Model.Consultants, "Choose Position", new { @class = "selectstyle" })
          @Html.ValidationMessageFor(model =&gt; model.ContactPerson)
      &lt;/div&gt;
  
      &lt;p&gt;Team&lt;/p&gt;
      &lt;div class="editor-field"&gt;
          @Html.DropDownListFor(model =&gt; model.TeamName, Model.Teams, "Choose Team", new { @class = "selectstyle" })
          @Html.ValidationMessageFor(model =&gt; model.ContactPerson)
      &lt;/div&gt;
  </code></pre>