Пример #1
0
    protected void Del_Click(object sender, EventArgs e)
    {
        string Id = "";

        if (VideoList.Items.Count > 0)
        {
            for (int i = 0; i < VideoList.Items.Count; i++)
            {
                CheckBox Cbox = VideoList.Items[i].FindControl("Cbox") as CheckBox;
                if (Cbox.Checked)
                {
                    Id = Id + Cbox.ToolTip + ",";
                }
            }
            if (Id.Length > 0)
            {
                Id = Id.Remove(Id.Length - 1, 1);
                if (bll.DelVideoByIds(Id))
                {
                    MessageBox.Show(this.Page, "删除成功!");
                }
                else
                {
                    MessageBox.Show(this.Page, "删除失败!");
                }
            }
        }
        dataBind("");
    }