String was not recognized as a valid salary.

Sep 18 2018 7:25 AM
How to insert  txtsalary=""; value into decimal  in database?
 
i am using 
 
objBAL.salary = txtSalary.Text == "" ? 0 : Convert.ToDecimal(txtSalary.Text);
 
but insert into databae
0.00 
 
we want 
 
null

Answers (1)