Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends,

I want to display the dates in the selected month.
I have two dropdownlists in my page

In the first dorpdownlist i stored
<asp:ListItem>January
       <asp:ListItem>February
            ..............
       <asp:ListItem>December


In the Second dropdownlist i stored

<asp:ListItem>2009
       <asp:ListItem>2010


Now i when i click the month and year i want to display the dates in the selected month of the corresponding year.

Is there any option to display the dates like this. If anybody know please tell me.

thanks,
Posted
Updated 2-Feb-11 22:17pm
v3

In Asp.net it is provide one simple feature is ..

DateTime.DaysInMonth(2011, 02); 


Here you can get number of days in particular month.

Now loop on days, bind your days dropdown.
 
Share this answer
 
Comments
Wild-Programmer 3-Feb-11 2:48am    
Perfect answer
soni uma 3-Feb-11 2:52am    
Link provided by you also working example..
sathya.spidy 4-Feb-11 1:09am    
Very Very thanks for your answer.
 
Share this answer
 
Comments
sathya.spidy 4-Feb-11 1:08am    
Very very thanks for your answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900