title: MVC3 lock textbox based on a selection on a dropdown menu
body: <p>I am making a form using ASP MVC 3 and I am new not only to web development but to ASP.NET MVC as well. </p>
  
  <p>The user will have the chance to either Pick one of the given questions from a dropdown menu, or write their own.  </p>
  
  <p>What I am trying to do, is to block the text field where the user will type a question in case the user previously selected any question from the dropdown menu.</p>
  
  <p>I can use either JavaScript or use MVC  (I preferably would like to use MVC code, but JavaScript can work as well).</p>
  
  <pre><code>&lt;tr&gt; 
  &lt;td width="40%" height="31"&gt;
  &lt;div align="right"&gt;&lt;strong&gt;Security question:&lt;/strong&gt;&lt;/div&gt;
   &lt;/td&gt;
   &lt;td width="60%" height="31"&gt; 
   @Html.DropDownListFor(m =&gt; m.PickSecretQuestion, new[] {
  
     new SelectListItem() { Text = "---select a question --- or create your own below --", Value = "createNew"},
     new SelectListItem() { Text = "Mother's Maiden Name?", Value = "Mother's Maiden Name?"},
     new SelectListItem() { Text = "Father's Middle Name?", Value = "Father's Middle Name?"},
     new SelectListItem() { Text = "What High School did you attend?", Value = "What High School did you attend?"},
     new SelectListItem() { Text = "First company you worked for?", Value = "First company you worked for?"}
  
     }
      &lt;/td&gt;  
      &lt;/tr&gt;
  
       &lt;tr&gt; 
       &lt;td width="40%" height="31"&gt;
       &lt;div align="right"&gt;&lt;strong&gt;Or create one here:&lt;/strong&gt;&lt;/div&gt;
       &lt;/td&gt;
       &lt;td width="60%" height="31"&gt; 
           @Html.TextBoxFor(m =&gt; m.SecretQuestion)
           &lt;span style="color:Red"&gt;  @Html.ValidationMessageFor(m =&gt; m.SecretQuestion &lt;/span&gt;
       &lt;/td&gt;  
       &lt;/tr&gt;
  </code></pre>