Пример #1
0
        public static string GetHTMLString(System.Data.DataTable dt)
        {
            StringBuilder htmlString = new StringBuilder();

            htmlString.Append("{Items:[");
            int index = 0;

            foreach (DataRow getRow in dt.Rows)
            {
                string getId   = AdobeUtil.IngoreNull(getRow["Id"]);
                string getText = AdobeUtil.IngoreNull(getRow["Text"]);
                if (index++ > 0)
                {
                    htmlString.Append(",");
                }
                htmlString.Append("{'UUID':'" + getId + "','DisplayText':'" + getText + "'}");
            }
            htmlString.Append("]}");
            return(htmlString.ToString());
        }