人の名前を選択するドロップダウンリストがあります。しかし、イベントの同じIDに同じ値を2つ持ちたいので、使用されている値を無効にする必要があります...データベースでは、compoudキーを使用して問題を修正しましたが、これをプログラムで解決する必要があります。
これは私の短いデータ ソースです。
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:fotbalConnectionString %>"
SelectCommand="SELECT table1.ID_person, table1.ID_event,FROM [table1] WHERE ([ID_event] = @ID_event)
<SelectParameters>
<asp:QueryStringParameter
DefaultValue="0"
Name="ID_event"
QueryStringField="id"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>