我有一个调查风格的网页,其中包含一系列“是/否”复选框,最后有一个提交按钮。选择box1时,我想取消选中box2。
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked == true)
{
CheckBox2.Enable = false;
}
}
public void Submit_Click(object sender, EventArgs e)
{
//Question1 - Checkbox1
if (CheckBox1.Checked == true)
{
SqlConnection con = new SqlConnection("");
String sql = "UPDATE INQUIRY2 set Question1 = @str WHERE email = @email AND base = @base;";
...
}