System.Web.UI.WebControls Namespace
Displays a single month calendar that allows the user to select a specific day, week, or month.
Visibility |
Constructor |
Parameters |
public |
Calendar |
( )
|
Visibility |
Name |
Value Type |
Accessibility |
public |
Caption
|
String |
[ Get , Set ] |
public |
CaptionAlign
|
TableCaptionAlign |
[ Get , Set ] |
public |
CellPadding
|
Int32 |
[ Get , Set ] |
public |
CellSpacing
|
Int32 |
[ Get , Set ] |
public |
DayHeaderStyle
|
TableItemStyle |
[ Get ] |
public |
DayNameFormat
|
DayNameFormat |
[ Get , Set ] |
public |
DayStyle
|
TableItemStyle |
[ Get ] |
public |
FirstDayOfWeek
|
FirstDayOfWeek |
[ Get , Set ] |
public |
NextMonthText
|
String |
[ Get , Set ] |
public |
NextPrevFormat
|
NextPrevFormat |
[ Get , Set ] |
public |
NextPrevStyle
|
TableItemStyle |
[ Get ] |
public |
OtherMonthDayStyle
|
TableItemStyle |
[ Get ] |
public |
PrevMonthText
|
String |
[ Get , Set ] |
public |
SelectedDate
|
DateTime |
[ Get , Set ] |
public |
SelectedDates
|
SelectedDatesCollection |
[ Get ] |
public |
SelectedDayStyle
|
TableItemStyle |
[ Get ] |
public |
SelectionMode
|
CalendarSelectionMode |
[ Get , Set ] |
public |
SelectMonthText
|
String |
[ Get , Set ] |
public |
SelectorStyle
|
TableItemStyle |
[ Get ] |
public |
SelectWeekText
|
String |
[ Get , Set ] |
public |
ShowDayHeader
|
Boolean |
[ Get , Set ] |
public |
ShowGridLines
|
Boolean |
[ Get , Set ] |
public |
ShowNextPrevMonth
|
Boolean |
[ Get , Set ] |
public |
ShowTitle
|
Boolean |
[ Get , Set ] |
public |
SupportsDisabledAttribute
|
Boolean |
[ Get ] |
public |
TitleFormat
|
TitleFormat |
[ Get , Set ] |
public |
TitleStyle
|
TableItemStyle |
[ Get ] |
public |
TodayDayStyle
|
TableItemStyle |
[ Get ] |
public |
TodaysDate
|
DateTime |
[ Get , Set ] |
public |
UseAccessibleHeader
|
Boolean |
[ Get , Set ] |
public |
VisibleDate
|
DateTime |
[ Get , Set ] |
public |
WeekendDayStyle
|
TableItemStyle |
[ Get ] |
|
While databinding is not supported for this control, the user may modify the contents of any day by hooking the DayRender event.
The following example illustrates how to declare a Calendar control at design time.
<html>
<body>
<h3>Calendar Example</h3>
<form runat = "server">
<asp:calendar runat = "server"
font-size=11pt
cellpadding=5 cellspacing=5
borderstyle = "groove" borderwidth=2
showgridlines=true
nextprevformat = "ShortMonth"
nextprevstyle-forecolor = "white"
nextprevstyle-font-size=8pt>
<titlestyle
backcolor = "steelblue"
forecolor = "white"
font-size=11pt
font-bold />
<dayheaderstyle
font-bold
forecolor = "khaki"
backcolor = "maroon" />
<weekenddaystyle
backcolor = "palegoldenrod"
width = "50px"
height = "50px" />
<todaydaystyle
font-bold
forecolor = "blue"
borderwidth=3 />
<selecteddaystyle
backcolor = "darkgreen"
font-bold />
<othermonthdaystyle
forecolor = "gray"
width = "50px"
height = "50px" />
</asp:calendar>
</form>
</body>
</html>
Show me
|
|