Try:
double price;
if (!double.TryParse(txtPrice.Text, out price))
{
...
return;
}
product.Price = price;
If Price is an integer - and it probably shouldn't be - then try:
double price;
if (!double.TryParse(txtPrice.Text, out price))
{
...
return;
}
product.Price = (int) price;
Never use Convert.To... to handle user input: it always throws an exception on bad values, and users make mistakes all the time. If you had filled out a form with a whole bunch of data, and the app then crashed because you types "," instead of "." you'd be pretty annoyed - so allow users to make mistakes and get them to correct them!