WebMonthView™ allows designers to specify a different day number format string through the FirstDayHeaderFormatString property. This format string gets applied on the first visible day (in the top-left corner) and on the first calendar day of every month.
The default FirstDayHeaderFormatString includes the abbreviated month. In this example, you will learn how to customize the FirstDayHeaderFormatString in code-behind to display only the day number (with no accompanying month.)
In Visual Basic:
Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As EventArgs) Handles MyBase.Load ' Set a custom .NET date/time format specifier ' on first days in the WebMonthView. Me.WebMonthView1.FirstDayHeaderFormatString = " d" End Sub
In C#:
protected void Page_Load(object sender, EventArgs e) { //Set a custom .NET date/time format specifier //on first days in the WebMonthView. this.WebMonthView1.FirstDayHeaderFormatString = " d"; }
For more information on other custom date/time format strings that can be used with WebSchedule, please see the section on "format specifiers" in Microsoft’s .NET Framework SDK.