When you insert the record at that time you should disable the product_id field. Add the condition like if product_id is blank then go to else part.
like below mentioned code.
if(!string.IsNullOrEmpty(lblProduct_Id.Text))
{
"UPDATE Logic"
}
else
{
"Insert Logic"
}
If ID is autogenerated then remove below line.
cmd.Parameters.Add("@product_id", SqlDbType.Int).Value = lblProduct_Id.Text.ToString();
If this helped you then mark it as answer and please
Vote.