Redigera

Dela via


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.

public:
 property System::Web::UI::WebControls::Calendar ^ WebCalendar { System::Web::UI::WebControls::Calendar ^ get(); };
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Web.UI.WebControls.Calendar WebCalendar { get; }
[<System.ComponentModel.Bindable(false)>]
[<System.ComponentModel.Browsable(false)>]
member this.WebCalendar : System.Web.UI.WebControls.Calendar
Public ReadOnly Property WebCalendar As Calendar

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.

// Distinguish the selected block using colors.
Calendar1.WebCalendar.SelectedDayStyle.BackColor =
   Color.LightGreen;
Calendar1.WebCalendar.SelectedDayStyle.BorderColor =
   Color.Gray;
Calendar1.WebCalendar.DayStyle.BorderColor = Color.Blue;
' 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

See also