System.Web.UI Namespace CalendarDay Class
Initializes a new instance of the CalendarDay class.
[ VB ]
Public Sub New ( _
ByVal date As DateTime, _
ByVal isWeekend As Boolean, _
ByVal isToday As Boolean, _
ByVal isSelected As Boolean, _
ByVal isOtherMonth As Boolean, _
ByVal dayNumberText As String _
)
[ C# ]
public CalendarDay (
DateTime date,
bool isWeekend,
bool isToday,
bool isSelected,
bool isOtherMonth,
string dayNumberText
);
[ C++ ]
public: CalendarDay (
DateTime date,
bool isWeekend,
bool isToday,
bool isSelected,
bool isOtherMonth,
String* dayNumberText
);
[ JScript ]
public function CalendarDay (
date : DateTime,
isWeekend : Boolean,
isToday : Boolean,
isSelected : Boolean,
isOtherMonth : Boolean,
dayNumberText : String
);
- date
- A System.DateTime object that contains the date represented by an instance of this class.
- isWeekend
- true to indicate that the date represented by an instance of this class is either a Saturday or a Sunday; otherwise, false.
- isToday
- true to indicate that the date represented by an instance of this class is the current date; otherwise, false.
- isSelected
- true to indicate that the date represented by an instance of this class is selected on the Calendar control; otherwise, false.
- isOtherMonth
- true to indicate that the date represented by an instance of this class is in a month other than the displayed month on the Calendar control; otherwise, false.
- dayNumberText
- The day number for the date represented by this class.
The following table shows initial property values for an instance of CalendarDay.
Property |
Initial Value |
Date |
The value of the date parameter. |
DayNumberText |
The value of the dayNumberText parameter. |
IsOtherMonth |
The value of the isOtherMonth parameter. |
IsSelected |
The value of the isSelected parameter. |
IsToday |
The value of the isToday parameter. |
IsWeekend |
The value of the isWeekEnd parameter. |
The following example demonstrates how to initialize a new instance of the CalendarDay class.
void DayRender ( Object src, DayRenderEventArgs e ) {
CalendarDay myCalendarDay = new CalendarDay (
e.Day.Date,
e.Day.IsWeekend,
e.Day.IsToday,
e.Day.IsSelected,
e.Day.IsOtherMonth,
e.Day.DayNumberText );
}
Sub DayRender ( source As Object, e As DayRenderEventArgs )
Dim myCalendarDay As New CalendarDay ( _
e.Day.Date, _
e.Day.IsWeekend, _
e.Day.IsToday, _
e.Day.IsSelected, _
e.Day.IsOtherMonth, _
e.Day.DayNumberText )
End Sub |
|
C# |
VB |
CalendarDay Members
|
|