B
Bostonasian
How do I manage empty string to null?
Do I have to code like following?
if(txtBoxFirstName.text == "")
cmd.Parameters.Add("@FirstName",DBNull.Value):
else
cmd.Parameters.Add("@FirstName",txtBoxFirstName.text):
Or are there better ways?
Also, I am curious about how to manage for integer as well.
Do I have to code like following?
if(txtBoxFirstName.text == "")
cmd.Parameters.Add("@FirstName",DBNull.Value):
else
cmd.Parameters.Add("@FirstName",txtBoxFirstName.text):
Or are there better ways?
Also, I am curious about how to manage for integer as well.