ASP.NET CalendarDay IsOtherMonth 属性
ASP.NET CalendarDay IsOtherMonth 属性
CalendarDay 控件定义和用法
IsOtherMonth 属性用于获取日期是否属于日历所显示的月份。
如果日期属于所显示的月份,则该属性返回 "FALSE",否则返回 "TRUE"。
实例
下面的实例显示了被选日期是否属于当前月:
<script runat="server">
Sub DaySelect(obj As Object, e As DayRenderEventArgs)
If e.Day.IsSelected Then
If e.Day.IsOtherMonth = "TRUE" Then
Label1.Text = "NO"
Else
Label1.Text = "YES"
End If
End If
End Subv </script>
<form runat="server">
<asp:Calendar id="cal1" runat="server"
OnDayRender="DaySelect"/>
The selected date is in the current month:
<asp:Label id="Label1" runat="server"/>
</form>
Sub DaySelect(obj As Object, e As DayRenderEventArgs)
If e.Day.IsSelected Then
If e.Day.IsOtherMonth = "TRUE" Then
Label1.Text = "NO"
Else
Label1.Text = "YES"
End If
End If
End Subv </script>
<form runat="server">
<asp:Calendar id="cal1" runat="server"
OnDayRender="DaySelect"/>
The selected date is in the current month:
<asp:Label id="Label1" runat="server"/>
</form>
演示实例 »
相关文章
- ASP.NET Web Pages 教程
- ASP.NET Web Pages 帮助器
- ASP.NET Web Pages WebGrid
- ASP.NET Web Pages Database 参考手册
- ASP.NET Web Pages WebMail 参考手册
- ASP.NET Razor 标记
- ASP.NET Razor 语法
- ASP.NET 服务器控件
- ASP.NET Repeater 控件
- ASP.NET 导航
- WebSecurity IsAuthenticated 属性
- WebSecurity InitializeDatabaseConnection 方法
- WebSecurity IsConfirmed 方法
- ASP.NET HTML 控件 Calendar 3
- ASP.NET HTML 控件 Hyperlink
- ASP.NET HTML 控件 用 重复
- ASP.NET HTML 控件 CustomValidator
- ASP.NET HTML 控件 Page_Load
- htmlanchor
- ASP.NET Calendar NextMonthText 属性