I am using a drop down lists for selecting the month and year in .aspx page. I have to get last date of the selected month of particular selected year in .aspx.cs page. (some months have 30 days and some have 31 days)
How can I do this?
Regards,
N.SRIRAM
You can use:
System.DateTime.DaysInMonth(int year, int month)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With