System.Text.StringBuilder拼装table
来源:互联网 发布:比邻协议软件 编辑:程序博客网 时间:2024/04/29 08:41
//建立业务层对象
SooF.BusinessRules.Apeak.BRSchools brSchool =new SooF.BusinessRules.Apeak.BRSchools();
DataSet ds = brSchool.SingleShoolsDataSet(Province);
if((ds.Tables.Count>0)&&(ds.Tables[0].Rows.Count>0))
{
iCount = ds.Tables[0].Rows.Count;
this.LabelCount.Text = iCount.ToString() ;
}
System.Text.StringBuilder mystr=new System.Text.StringBuilder();
dt = ds.Tables[0];
string BgColor = "";
if(iCount>0)
{
mystr.Append(@"<TABLE cellSpacing=""0"" cellPadding=""0"" width=""100%"" border=""0""><tr><td>" + "/n");
foreach(DataRow myRow in dt.Rows)
{
string id="ShowSchool.aspx?ID="+myRow["id"].ToString();
mystr.AppendFormat(@"<tr" + BgColor + @"><td width=""25%"" height=""25"">·<a href=""{0}"" class=""lan_01"" target=""_blank"">",id);
mystr.Append(@myRow["Name"].ToString());
mystr.Append(@"</a></div></td>");
mystr.Append(@"<td width=""21%""><div align=""center"" class=""hui_01"">");
mystr.Append(@myRow["Kind"].ToString());
mystr.Append(@"</div></td>");
mystr.Append(@"<td width=""30%"" class=""hui_01"" nowrap><div align=""center"">");
mystr.Append(@Convert.ToDateTime(myRow["PutTime"].ToString()).ToShortDateString());
mystr.Append(@"</div></td>");
string message = "AddSchoolMessage.aspx?ID="+myRow["id"].ToString();
mystr.Append(@"<td width=""24%"" class=""hui_01"" ><div align=""center"">");
mystr.AppendFormat(@"<a href=""{0}"" class=""lan_01"" target=""_blank"">",message);
mystr.Append(@messageText);
mystr.Append(@"</a></div></td></tr>");
if (BgColor == "")
{
BgColor = " bgcolor=/"#F5F5F5/"";
}
else
{
BgColor = "";
}
}
mystr.Append("</table>");
}
this.show.Text=mystr.ToString();
- System.Text.StringBuilder拼装table
- System.Text.StringBuilder 类
- System.Text.StringBuilder 类
- System.Text.StringBuilder 和System.String
- System.String和System.Text.StringBuilder
- System.Text.StringBuilder类处理…
- 后台拼装table
- system.string 和System.Text.StringBuilder的不同
- system.string 和 System.Text.StringBuilder的不同
- 学习笔记-- 使用System.Text.StringBuilder的方法和属性
- System::Text::StringBuilder::AppendFormat' : no overloaded function takes 7 arguments
- lua 把table拼装成字符串
- 早些时候设计的table拼装插件(初稿)
- 关于text table
- The System.Text Namespace
- System.Text命名空间
- System.Text.Encoding 简介
- System.Text 命名空间
- 这个秋天有点凉
- 2005.09.23-2005.09.25
- Session在ASP.NET中的应用资料整理
- 讀取文檔附件出現下載的方法
- JSP2.0九个标准隐含对象
- System.Text.StringBuilder拼装table
- 使用点,刷子,笔进行绘图
- 推荐使用金山WPS 2005 !
- 提高ASP.Net应用程序性能的十大方法
- 循环读取重名节点的方法
- 北京一日行之十一——雍和宫、孔庙、国子监、茅盾故居、文天祥祠、钟楼
- ORACLE SQL性能优化系列(八)
- ORACLE SQL性能优化系列(九)
- Have won a scholarship