Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have radiobuttonlist ib datalist when i make it autopostback the radiobutton item can not be check

XML
<asp:DataList ID="datalist_iq" runat="server" DataKeyField="id" BorderColor="Red">
                               <ItemTemplate>

                                   <table border="1">
                                       <tr>
                                           <td>
                                               <asp:Label ID="label_question_head" runat="server" Style="word-wrap: break-word" Width="310px" Height="91px" Font-Bold="true" ForeColor="Maroon">
                                                                   <%#Eval("q_head") %>

                                               </asp:Label>


                                           </td>
                                       </tr>

                                       <tr>

                                           <td>
                                               <asp:RadioButtonList ID="RadioButton1"  OnSelectedIndexChanged="RadioButton1_SelectedIndexChanged" AutoPostBack="true"   DataTextField="a_head" DataValueField="result" runat="server" Visible="true"  >


                                               </asp:RadioButtonList>

                                           </td>
                                       </tr>
                                   </table>





                              </ItemTemplate>
                         </asp:DataList>




i try to make radioputtonlist autopostback from the code but it is not work also


like that:



C#
foreach (DataListItem dli in datalist_iq.Items)
    {
         rblfilteritem = (RadioButtonList)dli.FindControl("RadioButton1");
      // rblfilteritem.AutoPostBack = true;
        a_content = q_object.retrive_a((int)datalist_iq.DataKeys[dli.ItemIndex]);
        rblfilteritem.DataSource = a_content;

        rblfilteritem.DataBind();



    }
    rblfilteritem.AutoPostBack = true;



}
Posted
Comments
Thanks7872 5-May-14 1:53am    
Dont repost question. Edit the one you have posted before.
Paulo Augusto Kunzel 5-May-14 9:30am    
Is that really a repost? Can you send the link for it?
Ashmaaelshabaka, if you are repostingm, please delete it.
ZurdoDev 5-May-14 12:47pm    
What?

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