Calendar.WebCalendar Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The underlying Web Forms Calendar.
- Attributes
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
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.
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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: