我有一个从数据库和四个标签中检索 ID 的下拉菜单。从用户 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>