ASP.NET CalendarDay IsOtherMonth 屬性
ASP.NET CalendarDay IsOtherMonth 屬性

定義和用法
IsOtherMonth 屬性用于獲取日期是否屬于日歷所顯示的月份。
如果日期屬于所顯示的月份,則該屬性返回 "FALSE",否則返回 "TRUE"。
實(shí)例
下面的實(shí)例顯示了被選日期是否屬于當(dāng)前月:
<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>
演示實(shí)例 ?

相關(guān)文章
- ASP.NET Web Pages 教程
- ASP.NET Web Pages 幫助器
- ASP.NET Web Pages WebGrid
- ASP.NET Web Pages Database 參考手冊(cè)
- ASP.NET Web Pages WebMail 參考手冊(cè)
- ASP.NET Razor 標(biāo)記
- ASP.NET Razor 語法
- ASP.NET 服務(wù)器控件
- ASP.NET Repeater 控件
- ASP.NET 導(dǎo)航
- WebSecurity IsAuthenticated 屬性
- WebSecurity InitializeDatabaseConnection 方法
- WebSecurity IsConfirmed 方法
- ASP.NET HTML 控件 Calendar 3
- ASP.NET HTML 控件 Hyperlink
- ASP.NET HTML 控件 用 重復(fù)
- ASP.NET HTML 控件 CustomValidator
- ASP.NET HTML 控件 Page_Load
- htmlanchor
- ASP.NET Calendar NextMonthText 屬性