title: Validating a textbox to allow only numeric values
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/463299/how-do-i-make-a-textbox-that-only-accepts-numbers">How do I make a textbox that only accepts numbers?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a phone number that I wish to store as a string.</p>
  
  <p>I read this in using </p>
  
  <pre><code>txtHomePhone.Text
  </code></pre>
  
  <p>What I think I need is some kind of is numeric but can't get it working</p>
  
  <pre><code>if (txtHomePhone.Text == //something.IsNumeric)
  {
      //Display error
  }
  else
  {
      //Carry on with the rest of program ie. Add Phone number to program.
  }
  </code></pre>
  
  <p>What is the best way to allow only numeric values to be entered? </p>