asp.net.ph

Calendar.SelectionMode Property

System.Web.UI.WebControls Namespace   Calendar Class


Sets or retrieves the date selection capabilities on the Calendar to allow the user to select a day, week, or month.

[ VB ]
Public Property SelectionMode As CalendarSelectionMode

[ C# ]
public CalendarSelectionMode SelectionMode {get; set;}

[ C++ ]
public: __property CalendarSelectionMode get_SelectionMode ( );
public: __property void set_SelectionMode ( CalendarSelectionMode );

[ JScript ]
public function get SelectionMode ( ) : CalendarSelectionMode;
public function set SelectionMode ( CalendarSelectionMode );

Property Value

One of the CalendarSelectionMode values. The default is Day.

Exceptions


Exception Type Condition
ArgumentException Occurs when the specified value is not one of the CalendarSelectionMode values.

Remarks

To disable date selection, set this property to None.

Example

The following example demonstrates how to set the SelectionMode property to allow date selection by day or month.

<asp:Calendar id = "myCalendar" runat = "server"
   SelectionMode = "DayWeek" />
See Also

Calendar Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph