title: Does SelectedItem.Text work in an if statement?
body: <p>I have a series of dropdown lists that on change are to call a function that converts overall value from binary to decimal and hex. I then have an if statement that checks that all lists have been changed. My If statement does not seem to be working correctly, and also if I choose 0 in a list the item switches back to --Select--.</p>
  
  <p>Here is the dropdown list code</p>
  
  <pre><code>&lt;asp:DropDownList ID="r1" runat="server" OnSelectedIndexChanged="convert" AutoPostBack="true" &gt;
      &lt;asp:ListItem Text="--Select--" Value="0" /&gt;
      &lt;asp:ListItem Text="0" Value="0" /&gt;
      &lt;asp:ListItem Text="1" Value="1" /&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>Here is the if statement</p>
  
  <pre><code>if (r1.SelectedItem.Text != "--Select--" &amp;&amp; 
      r2.SelectedItem.Text != "--Select--" &amp;&amp;      
      r3.SelectedItem.Text != "--Select--" &amp;&amp; 
      r4.SelectedItem.Text != "--Select--" &amp;&amp; 
      r5.SelectedItem.Text != "--Select--" &amp;&amp; 
      r6.SelectedItem.Text != "--Select--" &amp;&amp; 
      r7.SelectedItem.Text != "--Select--" &amp;&amp; 
      r8.SelectedItem.Text != "--Select--" &amp;&amp; 
      g1.SelectedItem.Text != "--Select--" &amp;&amp; 
      g2.SelectedItem.Text != "--Select--" &amp;&amp; 
      g3.SelectedItem.Text != "--Select--" &amp;&amp; 
      g4.SelectedItem.Text != "--Select--" &amp;&amp; 
      g5.SelectedItem.Text != "--Select--" &amp;&amp; 
      g6.SelectedItem.Text != "--Select--" &amp;&amp; 
      g7.SelectedItem.Text != "--Select--" &amp;&amp; 
      g8.SelectedItem.Text != "--Select--" &amp;&amp; 
      b1.SelectedItem.Text != "--Select--" &amp;&amp; 
      b2.SelectedItem.Text != "--Select--" &amp;&amp; 
      b3.SelectedItem.Text != "--Select--" &amp;&amp; 
      b4.SelectedItem.Text != "--Select--" &amp;&amp; 
      b5.SelectedItem.Text != "--Select--" &amp;&amp; 
      b6.SelectedItem.Text != "--Select--" &amp;&amp; 
      b7.SelectedItem.Text != "--Select--" &amp;&amp; 
      b8.SelectedItem.Text != "--Select--")
  {
      cBox.Attributes["InnerHtml"] = "test";
  }
  else
  {
      cBox.Attributes["InnerHtml"] = "world";
  }
  </code></pre>