[英]How do I call a function with checked and unchecked a checkbox from a checkboxlist?
I have a checkboxlist and i have to call function which perforform db job while checked a particular checkbox and unchecked a particular box. 我有一个复选框列表,我必须调用选中特定复选框并取消选中特定复选框时执行数据库作业的函数。 Plz help me out !!!!
请帮我!!!!
what about this, if it is a web application: 如果是Web应用程序,该怎么办:
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList1.SelectedValue == "your value")
{
//do logic
}
}
CheckBox.OnCheckedChanged Method (System.Web.UI.WebControls) Raises the CheckedChanged event of the CheckBox control. CheckBox.OnCheckedChanged方法(System.Web.UI.WebControls)引发CheckBox控件的CheckedChanged事件。 This allows you to handle the event directly.
这使您可以直接处理事件。
CheckBox.CheckedChanged Event (System.Windows.Forms) CheckedChanged Event. CheckBox.CheckedChanged事件(System.Windows.Forms)CheckedChanged事件。 Occurs when the value of the Checked property changes.
在Checked属性的值更改时发生。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.