<asp:DropDownList  ID="DropDownList_spec" runat="server" >
</asp:DropDownList>

数据绑定:

      DataTable dt = c_pub.GetSqlTable(strSQL);
                DropDownList_spec.DataSource = dt;
                DropDownList_spec.DataTextField = "StyleName";
                DropDownList_spec.DataValueField = "StyleId";
                DropDownList_spec.DataBind();

DataTextField是给用户看的
DataValueField谁给自己用的

<option value=DataValueField>DataTextField</option>

相关文章:

  • 2021-05-13
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案