1 ページに 10 個の DropDownList があります。すべてに同じデータソースを使用すると、10 個すべてで値が重複します。10 個の DropDownList すべてに 1 つの SqlDataSource を使用し、それぞれに異なる値のみを取得する方法はありますか。
これは、ドロップダウンと SqlDataSource の例です。
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="County" DataValueField="County"AppendDataBoundItems="true"></asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings %>"
SelectCommand="SELECT Distinct * FROM [Personal]"></asp:SqlDataSource>
前もって感謝します