altas(ajax)控件(五):日历控件Calendar

非常常见的一个控件
效果如下:
altas(ajax)控件(五):日历控件Calendar
默认calendar:
< asp:TextBox runat ="server" ID ="Date1" autocomplete ="off" />
< ajaxToolkit:CalendarExtender ID ="defaultCalendarExtender" runat ="server" TargetControlID ="Date1" />
注:需要设置的是
TargetControlID ="Date1"
带格式匹配的Calendar:
< asp:TextBox runat ="server" ID ="Date2" autocomplete ="off" />
< ajaxToolkit:CalendarExtender ID ="customCalendarExtender" runat ="server" TargetControlID ="Date2" CssClass ="MyCalendar" Format ="MMMMd,yyyy" />
注:需要设置的是
TargetControlID ="Date2"
Format ="MMMM d, yyyy"
按钮Calendar:
< asp:TextBox runat ="server" ID ="Date5" />
< asp:ImageButton runat ="Server" ID ="Image1" ImageUrl ="~/images/Calendar_scheduleHS.png" AlternateText ="Clicktoshowcalendar" />
< ajaxToolkit:CalendarExtender ID ="calendarButtonExtender" runat ="server" TargetControlID ="Date5" PopupButtonID ="Image1" />
注:需要设置的是
TargetControlID =" Date5"
Format ="MMMM d, yyyy"
PopupButtonID ="Image1"
好玩的是:日历控件的选择年
altas(ajax)控件(五):日历控件Calendar
和选择月的界面
altas(ajax)控件(五):日历控件Calendar

你可能感兴趣的:(Ajax,asp)