【发布时间】:2011-06-11 11:09:33
【问题描述】:
如何在asp.net的DropDownList中显示两列?
SqlDataSourceNamePeop.SelectCommand = "select name,forename from people";
DropDownListCaptain.DataTextField = "name";
像这样它只显示名称。但是我怎样才能显示名字+名字呢?
<asp:DropDownList ID="DropDownListPeople"
runat="server"
DataSourceID="SqlDataSourceNamePeop">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSourceNamePeop"
ConnectionString="xxxxx"
runat="server">
</asp:SqlDataSource>
【问题讨论】:
-
请告诉我们更多关于您正在使用的工具、框架、技术、后端工具的信息,谢谢。
标签: asp.net drop-down-menu sqldatasource