title: How to make a checkbox disabled without using any specific condition?
body: <p>I have a checkbox whose value is handled from the DB on the basis of the column isAllow. We have 5 names and corresponding to these name we have diff isAllow property. If the value of isAllow is true then the checkbox get checked.</p>
  
  <p>For four names, I have to make the checkbox as checked, but for one specific name out of 5, I have to mark the checkbox as disabled as well. I can achieve this by adding a condition as:</p>
  
  <pre><code>if(name=="Josh" &amp;&amp; isAllow)
  {
    chkBrand.Enable=false;
    chkBrand.Checked=true;
  }
  </code></pre>
  
  <p>I dont want to use the above condition here. I just want to get the checkbox as disable for a specific name without the condition.</p>
  
  <p>Below is the code that I have used:</p>
  
  <pre><code>        bool isAllow = false;
          bool SigCard = false;
  
          List&lt;AOTLuAffinity&gt; oAotluAffinity = bsAffinity.DataSource as List&lt;AOTLuAffinity&gt;;
  
          foreach (AOTLuAffinity oAffinity in oAotluAffinity)
          {
              if (oAffinity.Name == comboName.SelectedValue.ToString())
              {
  
                  isAllow = oAffinity.isAllowName;
                  signCard = AOTHelper.GetHasSigCardValue(workflowid, Acct.AffinityNum, comboPaBranch.SelectedValue.ToString(), Applicants.AffinityNum, isSignCard, isAllow );
                  if (isAllow)
                  {                        
              chkBrand.Checked=true;// here for a specific name, I want to make the checkbox as disabled, but I dont want to use the condition.
                  }
                  else
                  {
                      chkBrand.Checked=false;
                  }
                  break;
              }
          }
  </code></pre>
  
  <p>I am finding a hard time in getting this. Any help will be great.</p>