DropDown控件为任意控件指定下拉菜单,当然这个下拉菜单必须是已经存在的。
属性列表:
TargetControlID :需要附加下拉列表的文本框ID
DropDownControlID: 下拉列表(Panel)ID
DropArrowBackColor:下拉箭头的COLOR
DropArrowWidth:下拉箭头的WIDTH
HighlightBackColor:目标控件获得焦点时的背景色
HighLightBorderColor:目标控件获得焦点时的边框COLOR
客户端事件:
OnCloentPopulated,OnClientPopulating,OnClientPopup
实例解析一、文本框下实现Panel
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem>男</asp:ListItem>
<asp:ListItem>女</asp:ListItem>
</asp:RadioButtonList></asp:Panel>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:dropdownextender id="DropDownExtender1" runat="server" dropdowncontrolid="Panel1"
targetcontrolid="TextBox1"></cc1:dropdownextender>
</form>