I am getting this runtime exception
Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.String'.
How can I fix my code to get my result without exceptions?
ProductsDataContext db = new ProductsDataContext();
var matchedproduct = db.GetTable<product>().SingleOrDefault(p =>p.ProductID==productID);
if (matchedproduct != null)
product.ProductName = txtpname.Text;
db.SubmitChanges();