OnSelectedIndexChanged イベントを RadioButtoList (ListView 内) の SlectedIndexChanged イベントの listview にアタッチし、プログラムを実行して RadioButton をクリックすると、この特定のイベント発火用のすべてのコードを実装してもイベントが発火しません。ただし、構文エラーやコンパイル エラーはありません。ListView または RadioButtonList に対して呼び出すイベントの種類を教えてください。
.aspx コード:
<asp:ListView ID="ListView1" runat="server"  >
<itemtemplate>
    <asp:RadioButtonList ID="radiobuttonlist4" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" Width="240px"  onselectedindexchanged="selected">
        <asp:ListItem Value="agree" ></asp:ListItem>
        <asp:ListItem Value="disagree"></asp:ListItem>
        <asp:ListItem Value="strongagree"></asp:ListItem>
        <asp:ListItem Value="strongdisagree"></asp:ListItem>
    </asp:RadioButtonList>
</itemtemplate>
</listview>
コードビハインド:
protected void selected(object sender, EventArgs e)
{    
    RadioButtonList listtt = (RadioButtonList)sender;       
    ListViewItem item = (ListViewItem)listtt.NamingContainer;
    RadioButtonList er = (RadioButtonList)item.FindControl("radiobuttonlist4");    
    er.SelectedIndexChanged += new EventHandler(handle);                    
}
public void handle(object sender, EventArgs e)
{            
    Label3.Text = "hjeje";        
}