hi,
I am using ajax calendar extender and disabling past dates and future dates.
Below is the code to access three days before from the current date.
txtdateCalendarExtender.StartDate = DateTime.Now.AddDays(-3);
when counting days it should not count weekend.
Eg: today is tuesday . 3 days before means it is showing saturday. In this case it should not count sat and sunday..
How to do this in c#?
Pls help

Amitesh VermaRank #2,535 · 552 reputationPosted Jul 28, 2015, 9:13 PM EDT
{
if (e.Day.Date >= DateTime.Now.Date && e.Day.Date <= DateTime.Now.AddDays(2))
e.Cell.Visible = true;
else
e.Cell.Visible = false;
}
Priya Bm33 reputationPosted Jul 29, 2015, 8:03 PM EDT
Amitesh VermaRank #2,535 · 552 reputationPosted Jul 29, 2015, 8:57 PM EDT
{
if (e.Day.Date.DayOfWeek == DayOfWeek.Wednesday)
{
e.Cell.Controls.Clear();
}
}