示例#1
0
        private void BindGrid()
        {
            objAttachmentcls = new AttachmentCls();
            DataTable dt = objAttachmentcls.GetAllLibrary();

            if (dt.Rows.Count > 0)
            {
                gvData.DataSource = dt;
                gvData.DataBind();
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Data not found');", true);
            }
        }