【发布时间】:2017-10-12 22:35:24
【问题描述】:
我有以下代码,它是航班位置的下拉列表:
Where to:<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="Destination"
DataValueField="Destination" Width="222px">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Destination] FROM [tblFlight]">
</asp:SqlDataSource>
我希望能够使用从上面的下拉列表中选择的值(其中一个是科孚岛)作为查询的 WHERE 条件,该查询将只选择前往科孚岛的航班。 有什么建议吗?
【问题讨论】:
标签: sql asp.net select drop-down-menu