Latest web development tutorials

ASP.NET Calendar SelectionMode property

Calendar Control Calendar Control

Definition and Usage

SelectionMode property sets or returns how to allow the user to select a date.

grammar

<asp:Calendar SelectionMode="mode" runat="server" />

属性 描述
mode 规定允许用户选择日期的方式。

可能的值:

  • None
  • Day
  • DayWeek
  • DayWeekMonth


Examples

The following example sets the calendar SelectionMode:

<form runat="server">
<asp:Calendar id="cal1" runat="server"
SelectionMode="DayWeekMonth" />
</form>

The demonstration >>

Calendar Control Calendar Control