title: Select dates in asp.net Calendar programatically
body: <p>I'm using <code>Calendar</code> controller in my asp.net web forms application. I followed <a href="http://jayeshsorathia.blogspot.com/2012/09/beginning-net-multiple-selection-of-date-in-calendar-control.html" rel="nofollow">this article</a> to implement <code>Calendar</code> in my application. I'm adding selected days into a <code>List&lt;DateTime&gt;</code> to remember selected dates and use them in future actions.</p>
  
  <p>Now I have added buttons to my page like <code>Select Weekends</code>, <code>Select Weekdays</code>, <code>Select Month</code> and <code>Select Year</code>.</p>
  
  <ul>
  <li><p>if I click on the <code>Select Weekends</code> button, I need to select all weekend days of current month and add them into <code>List&lt;DateTime&gt;</code>.</p></li>
  <li><p>if I click on the <code>Select Weekdays</code> button, I need to select all week days of current month and add them into <code>List&lt;DateTime&gt;</code>.</p></li>
  <li><p>if I click on the <code>Select Month</code>** button, I need to select all days of the current month and add them into <code>List&lt;DateTime&gt;</code>.</p></li>
  <li><p>if I click on the <code>Select Year</code> button, I need to select all days of the current year and add them into <code>List&lt;DateTime&gt;</code>.</p></li>
  </ul>
  
  <p>How can I do this programatically using C#?</p>