Beispiel #1
0
    // update selected content
    protected void contentItemUpdating(object sender, FormViewUpdateEventArgs e)
    {
        Label   lblID   = (Label)fmv_content.FindControl("lbl_idU") as Label;
        TextBox txtPage = (TextBox)fmv_content.FindControl("txt_pageU") as TextBox;
        TextBox txtText = (TextBox)fmv_content.FindControl("txt_textU") as TextBox;

        contentClass objContent = new contentClass();

        objContent.ContentID   = Int32.Parse(lblID.Text.ToString());
        objContent.ContentPage = txtPage.Text.ToString();
        objContent.ContentText = txtText.Text.ToString();

        lbl_msg.Text = objContent.updateContent();
        fmv_content.ChangeMode(FormViewMode.ReadOnly);     //sends users back to original table view
        _subBind();
        _subBindDataList();
    }
Beispiel #2
0
    // update selected content row
    protected void dtl_contentUpdate(object sender, DataListCommandEventArgs e)
    {
        Label   lblID   = (Label)e.Item.FindControl("lbl_idU") as Label;
        TextBox txtPage = (TextBox)e.Item.FindControl("txt_pageU") as TextBox;
        TextBox txtText = (TextBox)e.Item.FindControl("txt_textU") as TextBox;

        contentClass objContent = new contentClass();

        objContent.ContentID   = Int32.Parse(lblID.Text.ToString());
        objContent.ContentPage = txtPage.Text.ToString();
        objContent.ContentText = txtText.Text.ToString();

        lbl_msg2.Text = objContent.updateContent();

        dtl_content.EditItemIndex = -1;     // sends user back to original table iew
        _subBind();
        _subBindDataList();
    }