Exemple #1
0
    protected void CB_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox chk = sender as CheckBox;
        //取得当前被选中项的索引
        int index = (chk.NamingContainer as DataListItem).ItemIndex;
        //取得当前选中项中的某个值,最好找ID。
        Label lbl = this.DataListworks.Items[index].FindControl("Labelwid") as Label;

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        wbll.CancleScoreWork(Int32.Parse(lbl.Text), chk.Checked);
        System.Threading.Thread.Sleep(200);
        ShowDoneWorks();
    }