Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 取消选择后,如何使用ASP RadioButtonList在SelectedIndexChanged上回发?_Jquery_Asp.net - Fatal编程技术网

Jquery 取消选择后,如何使用ASP RadioButtonList在SelectedIndexChanged上回发?

Jquery 取消选择后,如何使用ASP RadioButtonList在SelectedIndexChanged上回发?,jquery,asp.net,Jquery,Asp.net,我有一个癌症asp(3.5)RadioButton列表,在SelectedIndex上PostsBack已更改 <asp:RadioButtonList ID="rblSelectQuoteOrSolution" runat="server" OnSelectedIndexChanged="rblSelectQuoteOrSolution_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Vertical">

我有一个癌症asp(3.5)RadioButton列表,在SelectedIndex上PostsBack已更改

<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取消选择radiobuttonlist上的任何选项

$("#<%= rblSelectQuoteOrSolution.ClientID %> input[type=radio]").prop('checked',false);
$(“#input[type=radio]”)。prop('checked',false);
这是一个问题,因为如果用户在进行任何更改后返回radiobutton列表,并单击之前选择的同一个radiobutton,OnSelectedIndexChanged事件将不会触发,因为似乎只有客户端知道radiobutton选择已被清除,服务器端控件认为其仍处于选中状态

关于如何让radiobuttonlist发回服务器,即使用户选择了之前选择的radiobutton,您有什么想法吗?这可能是不可能的。

First Fall您已删除AutoPostback=true;在Javascript中:$(“#rblSelectQuoteOrSolution:checked”).on('change',function(){//Code.})
或

$(“input:radio:checked”).on('change',function(){//Code.})
但我希望radiobutton列表自动回发。问题是,当我用jQuery取消选择radiobuttonlist上的选项时,如果用户重新选择了我以前用jQuery取消选择的选项,我无法确定如何将控件设置为回发。例如,如果我将AutoPostback设置为false,并将您示例中的javascript设置为在控件更改时回发,则radiobuttonlist上的SelectedIndexChanged事件将永远不会触发。