【功能概述】
Accordion可以让你设计多个panel 并且一次只显示一个Panel .在页面上的显示效果就像是使用了多个CollapsiblePanels只不过每一次只展开其中一个CollapsiblePanel.Accordion控件内部包含了若干个AccordionPane,每一个AccordionPane的template里包括了对其Header和Content的定义。我们可以在后台代码中通过SelectedIndex属性取得当前展开的哪一个Panel,还可以控制哪一个Panel展开。
经常可以见到类似的效果,比如QQ、Msn好友分类的折叠效果。
【细节】
(1)不要把Accordion放在Table中而又把 FadeTransitions 设置为True,这将引起布局混乱
(2) 在AccordionPane模板中的Content中可以定义任何Web元素,表现的就像一个容器
(3) AccordionPane内容模板自动改变大小有三种AutoSize modes :None(推荐) Limit Fill
(4) $find('ctl00_ContentPlaceHolder1_MyAccordion_AccordionExtender')这里找到的是Behavior.什么是Behavior呢?在Asp.net Ajax框架中包含一组动作并完成一个功能. Accordion的一个Behavior就是淡入淡出.
找到Behavior的引用,behavior.set_FadeTransitions() behavior.get_FadeTransitions()的方式来实现具体某一个Behavior的访问和修改.
var behavior = $find('ctl00_SampleContent_MyAccordion_AccordionExtender');这种写法是不好的,我们在自动测试的页面中发现了更好的写法: var behavior=$find("<%= MyAccordion.ClientID %>_AccordionExtender");
【代码示意】
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></path><lock v:ext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><shape id="_x0000_i1026" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><scriptlanguage="javascript"type="text/javascript">
<shape id="Codehighlighter1_88_340_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1027"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_88_340_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1028"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image003.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif"></imagedata></shape>functiontoggleFade() {
<shape id="_x0000_i1030" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>varbehavior=$find('ctl00_ContentPlaceHolder1_MyAccordion_AccordionExtender');
<shape id="Codehighlighter1_217_326_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1031"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image006.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_217_326_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1032"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image007.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"></imagedata></shape>if(behavior) {
<shape id="_x0000_i1034" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>behavior.set_FadeTransitions(!behavior.get_FadeTransitions());
<shape id="_x0000_i1035" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image008.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"></imagedata></shape>}
<shape id="_x0000_i1036" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image009.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"></imagedata></shape>}
<shape id="Codehighlighter1_380_1526_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1037"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_380_1526_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1038"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image003.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif"></imagedata></shape>functionchangeAutoSize() {
<shape id="_x0000_i1040" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>varbehavior=$find('ctl00_ContentPlaceHolder1_MyAccordion_AccordionExtender');
<shape id="_x0000_i1041" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>varctrl=$get('autosize');//这里找的是下拉列表控件,不是Behavior
<shape id="Codehighlighter1_582_1418_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1042"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image006.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_582_1418_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1043"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image007.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"></imagedata></shape>if(behavior) {
<shape id="_x0000_i1045" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>varsize='None';//这里顺便看看怎么使用Select
<shape id="Codehighlighter1_693_1351_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1046"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image006.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_693_1351_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1047"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image007.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"></imagedata></shape>switch(ctrl.selectedIndex) {
<shape id="_x0000_i1049" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>case0:
<shape id="_x0000_i1050" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>behavior.get_element().style.height='auto';
<shape id="_x0000_i1051" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>size=AjaxControlToolkit.AutoSize.None;
<shape id="_x0000_i1052" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>break;
case1:
<shape id="_x0000_i1053" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>behavior.get_element().style.height='400px';
<shape id="_x0000_i1054" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>size=AjaxControlToolkit.AutoSize.Fill;
<shape id="_x0000_i1055" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>break;
<shape id="_x0000_i1056" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>case2:
<shape id="_x0000_i1057" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>behavior.get_element().style.height='400px';
<shape id="_x0000_i1058" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>size=AjaxControlToolkit.AutoSize.Limit;
<shape id="_x0000_i1059" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>break;
<shape id="_x0000_i1060" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image008.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"></imagedata></shape>}
<shape id="_x0000_i1061" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>behavior.set_AutoSize(size);
<shape id="_x0000_i1062" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image008.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"></imagedata></shape>}
<shape id="Codehighlighter1_1456_1512_Open_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1063"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image006.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"></imagedata></shape><shape id="Codehighlighter1_1456_1512_Closed_Image" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt="" o:spid="_x0000_i1064"><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image007.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"></imagedata></shape>if(document.focus) {
<shape id="_x0000_i1066" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"></imagedata></shape>document.focus();
<shape id="_x0000_i1067" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image008.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"></imagedata></shape>}
<shape id="_x0000_i1068" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image009.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"></imagedata></shape>}
<shape id="_x0000_i1069" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\【Asp_net%20Ajax%20RC版】Asp_net%20Ajax编程备忘录----%20再说28个服务器端控件%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></script>
<ajaxToolkit:AccordionID="MyAccordion"runat="server"SelectedIndex="0"HeaderCssClass="accordionHeader"
<shape id="_x0000_i1070" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape>ContentCssClass="accordionContent"FadeTransitions="false"FramesPerSecond="40"
<shape id="_x0000_i1071" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape>TransitionDuration="250"AutoSize="None">
<shape id="_x0000_i1072" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><Panes>
<shape id="_x0000_i1073" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><ajaxToolkit:AccordionPaneID="AccordionPane1"runat="server">
<shape id="_x0000_i1074" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><Header>
<shape id="_x0000_i1075" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><ahref=""onclick="returnfalse;"class="accordionLink">1.Accordion</a></Header>
<shape id="_x0000_i1076" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><Content>
<shape id="_x0000_i1077" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></Content>
<shape id="_x0000_i1078" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></ajaxToolkit:AccordionPane>
<shape id="_x0000_i1079" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></Panes>
<shape id="_x0000_i1080" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></ajaxToolkit:Accordion>
【功能概述】
AlwaysVisibleControl 是一个简单的扩展控件可以让一部分内容浮动在页面上,当滚动页面或者改变浏览器大小时总是可见的。它可以扩展任意一个Asp.net 控件,并可按照要求设置水平 竖直方向上的相对距离.
最多的应用是在线阅读的目录和不胜其烦的浮动小广告。
【细节】
(1) 避免控件闪烁,要扩展的控件要使用absolutely position
(2) HorizontalSide="Center" VerticalSide="Top" 使用这个方式控制浮动的位置
(3) Var label = ocument.getElementById('ctl00_SampleContent_currentTime');这行代码我们可以使用更简单的方法:
var label = $get('ctl00_SampleContent_currentTime');
【代码示意】
<shape id="_x0000_i1081" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape>代码示意:
<shape id="_x0000_i1082" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><cc1:AlwaysVisibleControlExtenderID="AlwaysVisibleControlExtender1"HorizontalSide="Center"VerticalSide="Top"TargetControlID="Panel1"runat="server">
【功能概述】
28个控件种效果最酷的!顾名思义实现动画效果。它是一个插入式,可扩展的框架可以方便的为你的页面添加动画效果。
【细节】
请参考页面代码阅读下面的细节内容:
(1)Sys.UI.DomElement.getLocation(b) 取得控件位置的函数,常用!!!
(2)动画分为两种:Animation Action 后者的强大让我很兴奋
(3)<Sequence> </Sequence> 顺序执行的动画脚本
(4)<Parallel> <Parallel > 并发执行的动画脚本
(5)【Action】 <StyleAction AnimationTarget="btnCloseParent" Attribute="opacity" value="0" /> 控制目标元素外观样式,属性--值的格式修改,一个元素可以应用多个StyleAction
(6)【Action】<EnableAction AnimationTarget="ctl00_ContentPlaceHolder1_btnInfo" Enabled="true" /> 控件是否可用使用的方式跟上面是一样的,当前控件可省略AnimationTarget
(7)【Action】 <ScriptAction Script="Cover($get('ctl00_ContentPlaceHolder1_btnInfo'), $get('flyout'));" />执行一段脚本的Action
(8) 【Action】 <HideAction />隐藏目标的控件
(9) 【Action】<OpacityAction AnimationTarget="info" Opacity="0" /> 设置透明度的Action
(10)【Animation】 <FadeIn AnimationTarget="info" Duration=".2"/> <FadeOut /> 淡入淡出
(11)【Animation】<Scale ScaleFactor="0.05" Center="true" ScaleFont="true" FontUnit="px" /> 控制目标元素的大小但是注意:If scaleFont is true, the size of the font will also scale with the element. If center is true, then the element's center will not move as it is scaled. It is important to note that the target must be positioned (i.e. absolutely) so that settings its top/left properties will change its location in order for center to have an effect.
(12) 【Animation】 <Pulse Duration=".1" /> 脉搏跳动效果
(13)【Animation】 <Color Duration=".2" StartValue="#FFFFFF" EndValue="#FF0000" Property="style" PropertyKey="color" /> 颜色渐变效果,设置起始结束颜色就可以
(14) 【Animation】 <Resize Width="260" Height="280" />改变元素的大小Action
(15)动画效果是在用户某一个动作发生的时候触发,触发的时机包括:OnLoad OnClick OnMouseOver OnMouseOut OnHoverOver OnHoverOut
正式版的页面文件为动画脚本添加了注释更加清晰易懂.上面列出的是常用的一些动画效果,全部资料参见Anmation Reference。
仔细阅读Animation的页面代码,其实我们已经提前触摸到了Xaml的编程风格。Asp.net Ajax之后的下一代WEB界面是WPF/E,WPF/E现在支持的是”javascript+Xaml” 还不支持”C# + Xaml”。
下一代的WEB UI会是怎样的?下一个版本的Asp.net 会怎样安排Ajax的位置?WPF/E会不会被整合在新版本的Asp.net中呢?期待中……
【示意代码】
代码示意:
<shape id="_x0000_i1083" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><ajaxToolkit:AnimationExtenderID="ae"
<shape id="_x0000_i1084" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape>runat="server"TargetControlID="ctrl">
<shape id="_x0000_i1085" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><Animations>
<shape id="_x0000_i1086" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnLoad><shape id="_x0000_i1087" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnLoad>
<shape id="_x0000_i1088" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnClick><shape id="_x0000_i1089" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnClick>
<shape id="_x0000_i1090" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnMouseOver><shape id="_x0000_i1091" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnMouseOver>
<shape id="_x0000_i1092" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnMouseOut><shape id="_x0000_i1093" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnMouseOut>
<shape id="_x0000_i1094" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnHoverOver><shape id="_x0000_i1095" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnHoverOver>
<shape id="_x0000_i1096" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape><OnHoverOut><shape id="_x0000_i1097" style="WIDTH: 11.25pt; HEIGHT: 15pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/dot.gif"></imagedata></shape></OnHoverOut>
<shape id="_x0000_i1098" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></Animations>
<shape id="_x0000_i1099" style="WIDTH: 8.25pt; HEIGHT: 12pt" type="#_x0000_t75" alt=""><imagedata src="file:///C:%5CDOCUME~1%5Cligaoren%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif" o:href="mhtml:file://C:\Documents%20and%20Settings\ligaoren\桌面\新建文件夹%20(3)\%5b最新版%5dAsp_net%20Ajax%20编程备忘录----细数28个服务器端控件%20%5b原创%5d%20-%20回头再说%20坚强2002的博客%20-%20博客园.mht!http://www.cnblogs.com/Images/OutliningIndicators/None.gif"></imagedata></shape></ajaxToolkit:AnimationExtender>
【功能概述】
AutoComplete控件是对Asp.net文本框控件的扩展,当用户词汇前面的字母时以弹出区域的形式给出备选词。这个功能的完成依赖于特定的Web Service。
在正式版的Ajax Control Toolkit中看到自动完成扩展控件有一种感觉:它终于出现在了它应该出现的地方。之前AutoComplete控件是在CTP版本中以核心组件的形式出现的,这个功能极为明确的控件被归类到核心组件,我还是比较迷惑。正式版中它终于成为了一个扩展控件。
Google的自动完成功能,新浪 网易等信箱的收件人自动完成功能是这个功能的成功应用。
【细节】
从Atlas的版本开始,AutoComplete的使用方法就没有太大的改变,只要注意:
(1)调用的Web Service方法签名有要求:
[WebMe