我正在实现一个 checkboxlist
,如果有任何项目被选中或取消选中,无论是哪个项目,我都想启动一个事件。如何实现,请帮忙。
我正在实现一个 checkboxlist
,如果有任何项目被选中或取消选中,无论是哪个项目,我都想启动一个事件。如何实现,请帮忙。
According to MSDN
<asp:RadioButtonList id="RadioButtonList1"
OnSelectedIndexChanged="Index_Changed"
AutoPostBack="true"
runat="server"/>
void Index_Changed(Object sender, EventArgs e)
{
Label1.Text = "You selected " + RadioButtonList1.SelectedItem.Text +
" with a value of $" + RadioButtonList1.SelectedItem.Value +
".";
}
CheckBoxList
。