如何在取消选择后用ASP RadioButtonList回发OnSelectedIndexChanged



我有一个癌症asp(3.5(单选按钮列表,它在SelectedIndexChanged 上发布返回

<asp:RadioButtonList ID="rblSelectQuoteOrSolution" runat="server"  OnSelectedIndexChanged="rblSelectQuoteOrSolution_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Vertical">
<asp:ListItem Text="Quote ID" Value="QuoteID"></asp:ListItem>
<asp:ListItem Text="Solution ID" Value="SolutionID"></asp:ListItem>
<asp:ListItem Text="Other" Value="Other"></asp:ListItem>
</asp:RadioButtonList>

在某个时刻,我使用jQuery 取消选择单选按钮列表上的任何选择

$("#<%= rblSelectQuoteOrSolution.ClientID %> input[type=radio]").prop('checked',false);

这是一个问题,因为如果用户在进行了他们想要的任何更改后回到单选按钮列表,并且他们单击了之前选择的同一个单选按钮,OnSelectedIndexChanged事件将不会触发,因为似乎只有客户端知道radiobutton选择已被清除,服务器端控件认为它仍然被选中!

即使用户选择了之前选择的单选按钮,如何将单选按钮列表发布回服务器,有什么想法吗?这可能是不可能的。

First Fall You have remove AutoPostback=true; In Javascript: $("#rblSelectQuoteOrSolution:checked").on('change',function(){ //Code. })
Or
$("input:radio:checked").on('change',function(){ //Code. })

最新更新