altas(ajax)控件(十):DropDown让文本框拥有下拉列表

图例:

altas(ajax)控件(十):DropDown让文本框拥有下拉列表

注意,”请选择“ 的是个文本框

 

< asp:Label  ID ="TextLabel"  runat ="server"  Text ="请选择"   Style ="display: block; width: 300px; padding:2px; padding-right: 50px; font-family: Tahoma; font-size: 11px;"   />
< asp:Panel  ID ="DropPanel"  runat ="server"  CssClass ="ContextMenuPanel"  Style ="display :none; visibility: hidden;" >
< asp:LinkButton  runat ="server"  ID ="Option1"  Text ="董昊"  CssClass ="ContextMenuItem"  OnClick ="OnSelect"   />
< asp:LinkButton  runat ="server"  ID ="Option2"  Text ="比尔盖茨"  CssClass ="ContextMenuItem"  OnClick ="OnSelect"   />
< asp:LinkButton  runat ="server"  ID ="Option3"  Text ="二百五"  CssClass ="ContextMenuItem"  OnClick ="OnSelect"   />             
</ asp:Panel >
< ajaxToolkit:DropDownExtender  runat ="server"  ID ="DDE"   
TargetControlID
="TextLabel"             
DropDownControlID
="DropPanel"   />

控件简介:

< ajaxToolkit:DropDownExtender  runat ="server"  ID ="DDE“
TargetControlID="
TextLabel"
DropDownControlID
="DropPanel" />

   

TargetControlID 需要附加下拉列表的文本框 ID
DropDownControlID 下拉列表( Panel ID
Animations - 动画效果,可以查看 altas(ajax)控件():动画制作控件AnimationExtender

 

 

你可能感兴趣的:(Ajax)