【发布时间】:2010-08-30 15:33:12
【问题描述】:
我有一个 AJAX 模态弹出面板,其中包含一个 RadioButtonList、2 个标签和 2 个下拉菜单。我想在选择单选按钮时更新标签和下拉菜单。我在此帖子上的尝试导致 ajax 弹出窗口消失。
图片点击时调用aspx:
<asp:Panel ID="pnlModalContainer" runat="server">
<asp:RadioButtonList ID="rblTest" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="rblTest_SelectedIndexChanged">
<asp:ListItem Text="Test 1" Value="1" Selected="True" />
<asp:ListItem Text="Test 2" Value="2" />
</asp:RadioButtonList>
<br />
<asp:Label ID="lblFoo" Text="Foo" />
<asp:Label ID="lblBar" Text="Bar" />
<asp:DropDownList ID="ddlDogs" runat="server" DataSourceID="odsDogs" DataTextField="Dog" DataValueField="DogID" />
<asp:DropDownList ID="ddlCats" runat="server" DataSourceID="odsCats" DataTextField="Cat" DataValueField="CatID" />
</asp:Panel>
代码背后(vb.net):
Protected Sub rblTest_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles rblTest.SelectedIndexChanged
' ???
' Make it change lblFoo.Text and lblBar.Text as well as the DataSource for the DDLs
End Sub
【问题讨论】:
标签: asp.net ajax ajaxcontroltoolkit