public void CustomForms() { if (rdbUploadType.SelectedValue == "Upload the Document") { UploadPDF(); } Custom_GetAllTableAdapter insertForms = new Custom_GetAllTableAdapter(); ActsTableAdapter UpdateActs = new ActsTableAdapter(); if (hdnId.Value.Length > 0) { int? id = Int32.Parse(hdnId.Value); if (bytes != null && bytes.Length > 1) { UpdateActs.UpdateCustomsById(ddlsubcategory.SelectedValue, txtCFormsIndex.Text, ddlCformsgroup.SelectedValue, ddlCformssubgroups.SelectedValue, null, null, null, edtData.Content, bytes, id); } else { UpdateActs.UpdateCustomsByIdNoDoc(ddlsubcategory.SelectedValue, txtCFormsIndex.Text, ddlCformsgroup.SelectedValue, ddlCformssubgroups.SelectedValue, null, null, null, edtData.Content, id); } Server.Transfer("editnotifications.aspx"); } else { insertForms.CutomForms_Insert(ddlsubcategory.SelectedValue, ddlCformsgroup.SelectedValue, ddlCformssubgroups.SelectedValue, txtCFormsIndex.Text, edtData.Content, bytes); } }