Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi,
I am trying to cause a partial postback using the radiobutton list's selection event but it causes full postback. Any idea why this could be happening?
I thought I would be able to get partial postback when;
1) The control is inside the Update Panel
2) The control's AutoPostback='true'
3) The control has AsyncPostBackTrigger
4) Update panels' UpdateMode="Conditional"

Partial postback occurs for the text box's text changed event but Full postback occurs when i click the radio button list item.

Here is the example of the aspx file;

XML
<ajaxToolkit:AccordionPane ID="AccordionCommodityInfo" runat="server">
                <Header>Commodity(ies)</Header>
               <Content>
                 <asp:UpdatePanel ID="UpdatePanelCommodity" runat="server" UpdateMode="Conditional">


                  <ContentTemplate>

XML
<asp:RadioButtonList ID="rdHousehold" RepeatDirection="Horizontal"  OnSelectedIndexChanged ="rdHousehold_SelectedIndexChanged" AutoPostBack="true" runat="server">
                          <asp:ListItem Text ="Yes" Value="Y"  />
                          <asp:ListItem Text ="No" Value="N" />
                       </asp:RadioButtonList>

<asp:TextBox ID="txtScheduleB" runat="server" AutoPostBack="true"  OnTextChanged ="txtScheduleB_textChanged" style="display:none;" Width="256px" ></asp:TextBox>

XML
</ContentTemplate>
                    <Triggers>
                     <asp:AsyncPostBackTrigger ControlID="txtScheduleB" />
                   </Triggers>

                   <Triggers>
                     <asp:AsyncPostBackTrigger ControlID="rdHousehold" EventName="SelectedIndexChanged"  />
                   </Triggers>

               </asp:UpdatePanel>
              </Content>
           </ajaxToolkit:AccordionPane>
Posted
Updated 6-Apr-17 13:56pm

1 solution

Just found out that I had to add ClientIDMode="Auto" to the Radiobutton list and it worked.
I don't understand why I had to, but it works...
 
Share this answer
 
Comments
Terence Golla 6-Nov-14 9:42am    
It's actually ClientIDMode="AutoID"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900