显示全年的 ASP.NET 可用性日历
我正在寻找一个 ASP.NET 控件,它将以网格格式显示全年,每个月作为一行,该月中的每一天作为列。我发现以下经典 ASP 脚本可以生成正确的格式: http:// /www.livio.net/code/calendar_36/CalendarTestYearly36.asp?infomode=HELP(请参阅年历)
是否有类似的内容,或者有没有一种方法可以在没有特定控件的情况下简单地执行此操作?我是 ASP.NET 新手。
谢谢
I am looking for a asp.net control that will display a full year in a grid format, with each month as a row and each day in the month as the columns. I have found the following classic ASP script which produces the correct format: http://www.livio.net/code/calendar_36/CalendarTestYearly36.asp?infomode=HELP (see Yearly Calendar)
Is anything like this available or is there a way to do this simply without a specific control? I am new to asp.net.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为你准备了这个:
Whipped up this, just for you:
您可以使用 ASP.NET 控件的组合来构建它,例如两个中继器,一个用于呈现月份,另一个用于呈现日期。这样做是可能的。包括该月的其他日期和包括一周中的某一天(如此处所示)可能会更困难,但这绝对是可能的。
内部中继器绑定日期,外部中继器绑定月份。
另一种方法可能是动态创建 DataTable 类并将所有逻辑用于在表中显示月份。在数据表中创建天数列,并为每个月创建一个新行。那也可以。
HTH。
You could build that with a combination of ASP.NET controls, such as two repeaters, one to render the months and one to render the days. It's possible to do it that way. It may be more difficult to include the other days of the month and to include the day of the week as depicted there, but its definitely possible.
The inner repeater binds the days, and the outer repeater binds the months.
An alternative may be to dynamically create a DataTable class and put all the logic to display the months within the table. Create as columns in the datatable the days, and create a new row for each month. That would work out too.
HTH.