title: calculator using radio buttons
body: <p>I'm trying to make a simple calculator using radio buttons in <code>asp.net</code> and <code>c#</code>. Two numbers are entered into a textbox each and a submit button is clicked and entered into a label.
  The error I get is when the radio button is checked and submit is clicked, I get a runtime error; can anyone please help diagnose why?</p>
  
  <p>This is my code:</p>
  
  <pre><code>int total;
  
  if (rbAdd.Checked)
  {
      total = Convert.ToInt32(tbNo1.Text) + Convert.ToInt32(tbNo2.Text);
      lblAns2.Text = total.ToString();
  }
  
  if (rbMult.Checked)
  {
      total = Convert.ToInt32(tbNo1.Text) * Convert.ToInt32(tbNo2.Text);
      lblAns2.Text = total.ToString();
  }
  </code></pre>