C#下拉框
先拉一个下拉框
<asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="true"><asp:ListItem Selected="True" Value="0">全部</asp:ListItem></asp:DropDownList>
在后台设置要显示的文本和要连接的ID
DropDownList1.DataSource = ProductCategoryManage.select();DropDownList1.DataTextField = "Name";DropDownList1.DataValueField = "Id";DropDownList1.DataBind();
最后记得把绑定数据源删除