日期:2014-05-17 浏览次数:20524 次
StringBuilder sb = new StringBuilder(); foreach (ListInfo info in list) { sb.Append("<div>"); sb.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\" style=\"height:100%; width:100%;\">"); sb.Append("<tr><td style=\"padding:0 0 0 10px; \" height=\"10px\">信息公告</td>"); if (info.showMore == 0) { sb.AppendFormat("<td style=\"padding:0 10px 0 10px; \" align=\"right\" height=\"10px\"><span style=\"cursor:pointer;\" onclick=\"{0}\">更多>></span></td>", info.showMoreLink); } sb.Append("</tr>"); foreach (DataRow dr in info.Data.Rows) { DateTime dt = Convert.ToDateTime(dr[1].ToString()); if (dr != null) { sb.AppendFormat("<tr><td valign=\"middle\" height=\"10px\"><ul style=\"padding:0 0 0 15px; \"><li><span style=\"cursor:pointer;\" onclick=\"{0}\"><font >{1}</font><span/></li></ul></td><td valign=\"middle\" height=\"10px\"><ul style=\"list-style:none\" ><li><font>{2}</font></li></ul></td></tr>", info.PageUrl, dr[0].ToString(), dt.ToShortDateString()); } } sb.Append("</table>"); sb.Append("</div>"); } return sb.ToString();