i want to insert null value into my 'dob' sql field by using textbox. but when i skip dobtxt box then show the message "string was not recognized as a valid Date Time";
my datebase structure as
SqlConnection conn = new SqlConnection("Data Source=RABBIL-PC; Initial Catalog =employee; Integrated Security = SSPI");
SqlDataAdapter da = new SqlDataAdapter();
da.InsertCommand = new SqlCommand("INSERT INTO employeetbl VALUES (" +
"@EM_ID, @TITLE, @FIRSTNAME,@LASTNAME,@DISIGNATION,@DOB,@BANKJOIN,@GENDER)", conn);
da.InsertCommand.Parameters.Add("@EM_ID", SqlDbType.NChar).Value = txtEmId.Text;
da.InsertCommand.Parameters.Add("@TITLE", SqlDbType.NChar).Value = txtTitle.Text;
da.InsertCommand.Parameters.Add("@FIRSTNAME", SqlDbType.NChar).Value = txtFirstName.Text;
da.InsertCommand.Parameters.Add("@LASTNAME", SqlDbType.NChar).Value = txtLastName.Text;
da.InsertCommand.Parameters.Add("@DISIGNATION", SqlDbType.NChar).Value = txtDisignation.Text;
da.InsertCommand.Parameters.Add("@DOB", SqlDbType.Date).Value = DateTime.Parse(dobtxt.Text.ToString());
da.InsertCommand.Parameters.Add("@BANKJOIN", SqlDbType.Date);
da.InsertCommand.Parameters.Add("@GENDER", SqlDbType.NChar).Value = combogender.Text;