if (dateLeaveFrom == dateLeaveTo)
{
((TextBox)dtvLeave.FindControl("txtLeaveDay")).Text = "1";
}
else
{
int From = int.Parse(((Calendar)dtvLeave.FindControl("cldLeaveFrom")).SelectedDate.Day.ToString());
int To = int.Parse(((Calendar)dtvLeave.FindControl("cldLeaveTo")).SelectedDate.Day.ToString());
int Total = (To - From) + 1;
((TextBox)dtvLeave.FindControl("txtLeaveDay")).Text = Total.ToString();
}