ASP.NET dropdownlist with 12 months and spanning multiple years
Posted on 2008-11-03
I am using ASP.NET, C#, and IE.
I need to create a dropdownlist box filled with 12 months. I know how to fill it with a straight 12 months, starting with January, all for the same year. But what I want to do is fill the dropdown box with 12 months, starting with the current month, and going forward 9 months and having 3 months in the rear. So, since the first month will be November, the list would start with August 2008 and have the next 12 months. But since after 5 months, it will be 2009, the dropdown box will have to have month with 2008 and 2009. Thanks in advance for the help.