> 
> **Possible Duplicate:**  
> 
> [How do I make a textbox that only accepts numbers?](https://stackoverflow.com/questions/463299/how-do-i-make-a-textbox-that-only-accepts-numbers) 
> 
> 
> 

I have a phone number that I wish to store as a string.

I read this in using 

```
txtHomePhone.Text

```

What I think I need is some kind of is numeric but can't get it working

```
if (txtHomePhone.Text == //something.IsNumeric)
{
    //Display error
}
else
{
    //Carry on with the rest of program ie. Add Phone number to program.
}

```

What is the best way to allow only numeric values to be entered?