asp.net-DropDownList 控件-1.1

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/caishu1995/article/details/86164144

DropDownList 控件介绍

下拉列表,每个可选项都是由 ListItem 元素定义

SelectedIndex   可选项的索引号
OnSelectedIndexChanged 当被选项目的 index 被更改时被执行的函数的名称
runat   规定该控件是服务器控件。必须设置为 "server"

附录:代码书写过程
.aspx文件中写入如下代码

<asp:DropDownList ID="dropList" runat="server">
     <asp:ListItem Text="aa"></asp:ListItem>
</asp:DropDownList>

猜你喜欢

转载自blog.csdn.net/caishu1995/article/details/86164144