protected void BindAttachment() { int? ID = UDFLib.ConvertIntegerToNull(Session["CPID"]); DataTable dt1 = objCP.GET_Charter_Party_Details(UDFLib.ConvertIntegerToNull(Session["CPID"])); if (dt1.Rows[0]["Charter_Id"] != null) { Charter_ID = dt1.Rows[0]["Charter_Id"].ToString(); } Session["Charter_ID"] = Charter_ID; DataTable dt = new DataTable(); dt = objCP.GET_CharterFiles(Charter_ID); gvAttachment.DataSource = dt; gvAttachment.DataBind(); //Repeater1.DataSource = dt; //Repeater1.DataBind(); }