I have asp.net page with checkbox and textbox, if checkbox is checked then textbox is made visible and I then need to check for a valid date. However if checkbox is not checked then I hide textbox and do not need to check for a valid date. How can I do this? This is my code.......
customer.DateRaised = DateTime.Parse(txtDate.Text); //check for valid date here
customer.DateRaised = DateTime.Now;