データベースから ID を取得するドロップダウン メニューと 4 つのラベルがあります。ユーザー ID から、ラベルには ID に属するデータが表示されます。私の場合、ID には値が 1 つしかないため、自動ポストバックでページが更新されません。ラベルにデータを表示させる方法はありますか?
<asp:DropDownList ID="DropDownList5" runat="server"
DataSourceID="SqlDataSource3" DataTextField="Id" DataValueField="Id"
Height="16px" Width="145px" AutoPostBack="True"
onselectedindexchanged="DropDownList5_SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:Connection %>"
SelectCommand="SELECT [Id] FROM [Rsvp] WHERE (([Model] = @Model) AND ([Username] = @Username))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="Model"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList3" Name="Username"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>