Calendar.WebCalendar Property

Definition

Gets the underlying Web Forms Calendar control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Web.UI.WebControls.Calendar WebCalendar { get; }

Property Value

The underlying Web Forms Calendar.

Attributes

Examples

The following code example uses the WebCalendar property to apply formatting that is only available in the underlying System.Web.UI.WebControls.Calendar control. This example is part of a larger code sample for the Calendar overview.

C#
// Distinguish the selected block using colors.
Calendar1.WebCalendar.SelectedDayStyle.BackColor =
   Color.LightGreen;
Calendar1.WebCalendar.SelectedDayStyle.BorderColor =
   Color.Gray;
Calendar1.WebCalendar.DayStyle.BorderColor = Color.Blue;

Remarks

The ASP.NET mobile controls do not duplicate the properties of the ASP.NET Web Forms Calendar control that are not supported on mobile devices. Thus, if you want to use features that are available for the underlying Calendar control, you do so by accessing the System.Web.UI.WebControls.Calendar object through the WebCalendar property.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also