title: Disable a dropdown based on what is defined in the Model also set Radio button to No
body: <p>I have a Radio button, that is preselected as No in the model. But I want it to disable a dropdown menu automatically. But if you select Yes then the dropdown works. I am aware that you can do it with JQuery. But I was wondering if its possible with C# MVC.</p>
  
  <pre><code>        &lt;div class="form-group dropdownSwitchContainer"&gt;
                          &lt;label class="control-label col-md-2" for="TenantGroup"&gt;Is this a Proxy Organisation?&lt;/label&gt;
                          &lt;div class="col-lg-6"&gt;
                              &lt;div class="admin-form theme-primary"&gt;
                                  &lt;div class="radio-custom radio-primary mt10 mr10 pull-left"&gt;
                                      @Html.RadioButtonFor(m =&gt; m.ProxyOrganisation, true, new { @class = "control-label col-md-4" })
                                      &lt;label for="ProxyYes"&gt;Yes&lt;/label&gt;
                                  &lt;/div&gt;
                                  &lt;div class="radio-custom radio-primary mt10 mr10 pull-left"&gt;
                                      @Html.RadioButtonFor(m =&gt; m.ProxyOrganisation, true, new { @class = "control-label col-md-4" })
                                      &lt;label for="ProxyYes"&gt;No&lt;/label&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      @{
      var emptyList = new List&lt;SelectListItem&gt;();
      var proxiesList = new SelectList(emptyList);
      if (proxies != null)
      {
          proxiesList = new SelectList(proxies, "key", "value", 0);
      }
                      }
                      &lt;div class="form-group"&gt;
                          &lt;label class="control-label col-md-2" for="AlternativeShippingTarget"&gt;Alternative Shipping Target&lt;/label&gt;
                          &lt;div class="col-md-8"&gt;
                              @Html.DropDownListFor(x =&gt; x.ShippingTarget, proxiesList, "Choose a target...", new { id = "targetSelect", @class = "form-control", placeholder = "Choose a target..." })
                              @Html.ValidationMessageFor(m =&gt; m.ShippingTarget, string.Empty, new { @class = "text-danger" })
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>`var model = new ViewModels.SocietiesCreateModel
              {
                  SocietyName = string.Empty,
                  CISACCode = string.Empty,
                  ShippingTarget = string.Empty,
                  ProxyOrganisation = false,
  
                  PagingInfo = new ViewModels.PagingModel
                  {
                      Page = page,
                      Take = take,
  
                      SortAscending = sortAsc,
                      SortPropertyName = sortBy
                  }
              };`
  </code></pre>