you get that error if text box is empty, if you want to add nothing if textbox is empty then try
double
value = 0;
double.TryParse(txtNoOfdays.Text, out value); // trying to parse if not possible value will remain 0
dtpToDate.Value = dtpFromDate.Value.AddDays(value);
Arjun Paudel