how to pass a textbox in a method .the text box has the date
public void Cformat(DIVISION _DivAPath )
{
if (TxtFrom.Text != "" && TextTo.Text != "")
{
}
else
{
string fromdate = (TxtFrom.Text);
string todate = (TxtTo.Text);
string[] formats = { "dd/MM/yyyy" };
DateTime dateFrom = DateTime.ParseExact(fromdate, formats, new CultureInfo("en-US"), DateTimeStyles.None);
DateTime dateTo = DateTime.ParseExact(todate, formats, new CultureInfo("en-US"), DateTimeStyles.None);
_DivAPath.FROM_DATE = dateFrom;
_DivAPath.TO_DATE = dateTo;
}
...
Go to the complete details ...