Assembly: System.Web.Mobile (in system.web.mobile.dll)
The calendar display is by day, week, or month. Whether an entire month is rendered on a mobile device depends on the capabilities of the device. In general, the Calendar control permits the selection of a date.
The mobile Calendar control wraps a Web Forms Calendar control. Although the mobile Calendar control mimics some properties, methods, and events of the underlying control, it does not expose other properties specific to HTML rendering. To modify these, you can access the underlying control through the WebCalendar property and modify the settings directly.
The following code example shows how the SelectionMode property in the page load code block allows the user to select a day, a week, or a month block of time. This example sets the BorderStyle and BackColor properties of the Calendar class to distinguish the user selection.
The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see ASP.NET Web Page Code Model.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.