如何显示所选月份中的日期 [英] How to display the dates in the selected month

查看:68
本文介绍了如何显示所选月份中的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我想显示所选月份中的日期.
我的页面上有两个下拉列表

在第一个dorpdownlist中,我存储了

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,

推荐答案

在Asp.net中,它提供了一个简单的功能:..

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.


请检查此 ^ ]


这篇关于如何显示所选月份中的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆