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
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sai Kumar KoonaRank #334 · 7.5K reputationPosted Sep 18, 2018, 6:10 AM EDT