title: Is it good practice to have lots of if else condition?
body: <p>In one of my web application  I am using string builder from code behind.</p>
  
  <pre><code>StringBuilder str = new StringBuilder();
  if (isLogIN != false)
  {
      if (isValidUser == true)
      {
          str.Append("&lt;div id='sfBtnSubmitWrapper' &gt;");
          if (CheckIfAlreadyPlayed())
          {                           
              str.Append("&lt;input type='button'");
              str.Append("value='Predict Now' class='sfBtn' id='sfBtnSubmitAnswer' /&gt;");                               
          }
          else
          {
              str.Append("&lt;input type='button'");
              str.Append("value='Already participated.' class='sfBtn' id='sfBtnSubmitAnswer' /&gt;");
          }
           str.Append("&lt;/div&gt;");
      }
      else
      {
          if (CheckEarnedGame())
          {
              str.Append("&lt;div id='sfBtnSubmitWrapper' &gt;&lt;input type='button'");
              str.Append("value='Predict Now' class='sfBtn' id='sfBtnSubmitAnswer' /&gt;");
              str.Append("&lt;p style='color:green'&gt;You have reached your daily limit");
              str.Append("but your earned games still remain.&lt;/p&gt;");
              str.Append("&lt;/div&gt;");
          }
          else
          {
              str.Append("&lt;div id='sfSettingInfo'&gt;");
              str.Append("&lt;a class='ClosePopupImg' id='closeOptionDiv' title='Close'&gt;&lt;/a&gt;");
              str.Append("&lt;span id='errorLimitmsg'&gt;");
              str.Append("&lt;p style='color:red'&gt;Sorry !!!&lt;/br&gt;You have crossed");
              str.Append("your limit of games.&lt;/p&gt;&lt;/span&gt;&lt;span id='btnPlayMore'");
              str.Append("class='sfBtn'&gt;Play More");
              str.Append("&lt;/span&gt;&lt;div id='optionDiv'&gt;&lt;/div&gt;&lt;/div&gt;");
          }
      }
  }
  </code></pre>
  
  <p>There is even more (if else) condition that I am using in my real code.I am little bit confuse whether it is good practice to use lots of if else condition or  Is there any other way to do it.</p>