判断CheckBoxList至少选择一项

代码
  protected void Button1_Click(object sender, EventArgs e)
        {
            
if (CheckBoxList1.SelectedIndex==-1)
            {
                Response.Write(
"请至少选择一项!");
                
return;
            }
        }

 

posted @ 2010-07-23 16:09  唔愛吃蘋果  阅读(389)  评论(0编辑  收藏  举报