WebCalendar Property

Returns the underlying Web Forms Calendar control.

public System.Web.UI.WebControls.Calendar WebCalendar {


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 Web Forms Calendar control, you do so by accessing the underlying Web Forms Calendar object through the WebCalendar property.


The following example demonstrates how to use the WebCalendar property to change the border style and color for each day when a form is activated. In the ASP.NET mobile designer, add the following code to the code-behind page after you add a Calendar control to your form.

Private Sub CalendarForm_Activate(sender As Object, e As EventArgs)

   Calendar1.WebCalendar.DayStyle.BorderStyle = System.Web.UI.WebControls.BorderStyle.Double
   Calendar1.WebCalendar.DayStyle.BorderColor = System.Drawing.Color.Blue

End Sub


private void CalendarForm_Activate(object sender, System.EventArgs e)
   CalendarDaytimer.WebCalendar.DayStyle.BorderStyle. =
   CalendarDaytimer.WebCalendar.DayStyle.BorderColor = Color.Bisque

See Also

Applies to: Calendar Class