you need to set the parameter values with correct type. try below for
Decimal
parameter with
AddWithValue
method
decimal yourValue = Convert.ToDecimal(txtprice.Text);
cmd.Parameters.AddWithValue("@Price",yourValue);
Also note that your stored procedure name is
arts
but in your code you put as
spInsertArts
, make sure that you have given correct stored procedure name as in database
SqlCommand cmd=new SqlCommand("spInsertArts",con);