在这里你可以看到我的 html 代码。我需要运行 OnSelectedIndexChanged 事件,但我必须防止回发所有页面。我应该怎么办?
<asp:UpdatePanel runat="server" ID="upRemittance">
<ContentTemplate>
<asp:RadioButtonList runat="server" ID="rblRemittance" AutoPostBack="True" OnSelectedIndexChanged="rblRemittance_OnSelectedIndexChanged">
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
RadioButtonList 绑定方法:
List<remittance> remittances = _mainService.RemitanceActiveList().ToList();
if (remittances.Count > 0)
{
rblRemittance.DataSource = remittances;
rblRemittance.DataTextField = "BankName";
rblRemittance.DataValueField = "RemitanceId";
rblRemittance.DataBind();
}