本文介绍了当我在Radiobuttonlist中选择项目时,如何获取此事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有嵌套的datalist,





i have nested datalist ,


<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"   DataTextField="a_head" DataValueField="result" runat="server" Visible="true" >


                                               </asp:RadioButtonList>

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


                              </ItemTemplate>
                         </asp:DataList>



















i当我在radiobuttonlist中选择项目时想要获取DataKeyField

我怎么能得到这个事件





i可以通过此代码检索radiobuttonlist












i want to get DataKeyField when i select item in radiobuttonlist
how can i get this event


i can retrive the radiobuttonlist by this code

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



}







但是我当我选择一个radiobutton




but i want to access the event when i select one radiobutton

推荐答案

这篇关于当我在Radiobuttonlist中选择项目时,如何获取此事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 20:16