autopostback到datalist中的radiobuttonlist [英] autopostback to radiobuttonlist in datalist

查看:143
本文介绍了autopostback到datalist中的radiobuttonlist的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有radiobuttonlist ib datalist当我进行autopostback无线电按钮项目无法检查



i have radiobuttonlist ib datalist when i make it autopostback the radiobutton item can not be check

<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尝试从代码中生成radioputtonlist autopostback,但它也不起作用





喜欢:











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


like that:



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;



}

推荐答案

这篇关于autopostback到datalist中的radiobuttonlist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆