CalendarSelectionMode 列挙体
アセンブリ: System.Web (system.web.dll 内)

Public Enumeration CalendarSelectionMode

メンバ名 | 説明 | |
---|---|---|
Day | Calendar コントロールでは、単一の日付を選択できます。 | |
DayWeek | Calendar コントロールでは、単一の日付または週を選択できます。 | |
DayWeekMonth | Calendar コントロールでは単一の日付、週、または月を選択できます。 | |
None | Calendar コントロールで日付は選択できません。 |


<%@ Page Language="VB" AutoEventWireup="True" %> <html> <script runat="server" > Sub Selection_Change(sender As Object, e As EventArgs) ' Set the day selection mode. Calendar1.SelectionMode = _ CType(ModeList.SelectedIndex, CalendarSelectionMode) End Sub </script> <body> <form runat="server"> <h3> Calendar SelectionMode Example </h3> Choose the date selection mode. <br><br> <asp:Calendar id="Calendar1" ShowGridLines="True" ShowTitle="True" runat="server"/> <br><br> <table cellpadding="5"> <tr> <td> Mode: </td> </tr> <tr> <td> <asp:DropDownList id="ModeList" AutoPostBack="True" OnSelectedIndexChanged="Selection_Change" runat="server"> <asp:ListItem> None </asp:ListItem> <asp:ListItem Selected="True"> Day </asp:ListItem> <asp:ListItem> DayWeek </asp:ListItem> <asp:ListItem> DayWeekMonth </asp:ListItem> </asp:DropDownList> </td> </tr> </form> </body> </html>
<%@ Page Language="C#" AutoEventWireup="True" %> <html> <script runat="server" > void Selection_Change(Object sender, EventArgs e) { // Set the day selection mode. Calendar1.SelectionMode = (CalendarSelectionMode)ModeList.SelectedIndex; } </script> <body> <form runat="server"> <h3> Calendar SelectionMode Example </h3> Choose the date selection mode. <br><br> <asp:Calendar id="Calendar1" ShowGridLines="True" ShowTitle="True" runat="server"/> <br><br> <table cellpadding="5"> <tr> <td> Mode: </td> </tr> <tr> <td> <asp:DropDownList id="ModeList" AutoPostBack="True" OnSelectedIndexChanged="Selection_Change" runat="server"> <asp:ListItem> None </asp:ListItem> <asp:ListItem Selected="True"> Day </asp:ListItem> <asp:ListItem> DayWeek </asp:ListItem> <asp:ListItem> DayWeekMonth </asp:ListItem> </asp:DropDownList> </td> </tr> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- CalendarSelectionMode 列挙体のページへのリンク