im using vs 2010.
the below code is how i’ve put 2 dates in the 2 text boxes.I want to know how i can calculate the no. of days between them.If possible can u tell me how to also take off Sundays from that number.thnx in advance
protected void LinkButton1_Click(object sender, EventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox3.Text = Calendar1.SelectedDate.ToLongDateString();
Calendar1.Visible = false;
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Calendar2.Visible = true;
}
protected void Calendar2_SelectionChanged(object sender, EventArgs e)
{
TextBox4.Text = Calendar2.SelectedDate.ToLongDateString();
Calendar2.Visible = false;
}
This should work.
However, this does not exclude Sundays.