title: dropdownlist value: converting from string to int then back to string and display in textbox
body: <p>I have multiple dropdown lists. I'm trying to have dropdown list input values to be added together and that the answer be displayed in a textbox. I'm converting the values into integers for the arithmetic operations and then back into strings to display the answer in the textbox. </p>
  
  <p>It builds without errors in Visual Studio and when loaded in the browser. But when you select one dropdownlist an error will occur: "Input string was not in the correct format." For the life of me I can't find the error with the code:</p>
  
  <p>displayRed is the Textbox i want the answer to be displayed in
  Red1DD, Red2DD etc. are the dropdownlists.</p>
  
  <pre><code>displayRed.Text =
    (Convert.ToInt32(Red1DD.SelectedValue.ToString())
   + Convert.ToInt32(Red2DD.SelectedValue.ToString())
   + Convert.ToInt32(Red4DD.SelectedValue.ToString())
   + Convert.ToInt32(Red8DD.SelectedValue.ToString())
   + Convert.ToInt32(Red16DD.SelectedValue.ToString())
   + Convert.ToInt32(Red32DD.SelectedValue.ToString())
   + Convert.ToInt32(Red64DD.SelectedValue.ToString())
   + Convert.ToInt32(Red128DD.SelectedValue.ToString())).ToString();
  </code></pre>
  
  <p>this is what one of the dropdownlists look like:</p>
  
  <pre><code>&lt;asp:DropDownList ID="Red1DD" runat="server" AutoPostBack="True" OnSelectedIndexChanged="red_SelectedIndexChanged"&gt;
          &lt;asp:ListItem Selected="True" Value="" Text="--" /&gt;
          &lt;asp:ListItem value="0" Text="0" /&gt;
          &lt;asp:ListItem value="1" Text="1" /&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>