コード例 #1
0
    // delete selected content row
    protected void dtl_contentDelete(object sender, DataListCommandEventArgs e)
    {
        Label        lblID      = (Label)e.Item.FindControl("lbl_id");
        contentClass objContent = new contentClass();

        objContent.ContentID = Int32.Parse(lblID.Text.ToString());

        lbl_msg2.Text = objContent.deleteContent();
        _subBind();
        _subBindDataList();
    }
コード例 #2
0
    // delete selected content
    protected void contentItemDeleting(object sender, FormViewDeleteEventArgs e)
    {
        Label        lblID      = (Label)fmv_content.FindControl("lbl_id") as Label;
        contentClass objContent = new contentClass();

        objContent.ContentID = Int32.Parse(lblID.Text.ToString());

        lbl_msg.Text = objContent.deleteContent();
        fmv_content.ChangeMode(FormViewMode.ReadOnly);     //sends users back to original table view
        _subBind();
        _subBindDataList();
    }