【发布时间】:2013-07-16 01:28:42
【问题描述】:
我有下拉列表,其中通过连接到数据库来添加值。
这是我的代码:
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="devicetype" DataValueField="devicetype"></asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PHSNew %>" SelectCommand="SELECT DISTINCT [devicetype] FROM [dx_devices]"></asp:SqlDataSource>
现在我想在下拉列表中再添加一个选项“Any”。
如何添加?
【问题讨论】:
标签: c# asp.net sql-server drop-down-menu