Click here to Skip to main content
15,851,387 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to count total days in pertricular month using stored procedure.

i have one dropdown,which select month.i have to display number of days in that month in gridview.
Updated 11-Jul-14 19:05pm
Sergey Alexandrovich Kryukov 19-Feb-13 1:13am    
What did you try so far?

Paste this code in DDL SelectedIndexChanged event

int days = DateTime.DaysInMonth(2013, Convert.ToInt32(ddlMonth.SelectedValue));

For Sql Server[^][]
Share this answer
Always follow the tips: :-) Day DropDown[^]
Share this 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