My code throws an error:
When converting string to datetime, parse the string to take the date before putting each variable into datetime object.
CODE:
I need to display default value in text box i.e. current date.
txtIssuingDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
Then i need to save that in DB too without in specified format
ComposedLetterBizz CompLetterBizz = new ComposedLetterBizz(Convert.ToInt32(txtName.Text),
Convert.ToInt32(HiddenFieldComplaintID.Value),
txtLetterNo.Text,
txtDispatchNo.Text,
txtSubject.Text,
Convert.ToInt16(ddlDepartments.SelectedValue),
Convert.ToInt16(ddlDesignations.SelectedValue),
Convert.ToDateTime(txtIssuingDate.Text),
Convert.ToDateTime(txtDeadLine.Text));