if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
count = ds.Tables[0].Rows.Count;
int index = 1;
foreach (DataRow row in ds.Tables[0].Rows)
{
string b = row["BatchID"].ToString();
if (index % 2 == 0)
{
html += "<tr style='text-align:left;background-color:#ffffff;height:19px;'>";
html += "<td valign=top align=center tyle='height:19px;font-size:10pt;color:#000000;width:10%'>" + row["BatchID"].ToString() + "</td>";
html += "<td valign=top align=center style='height:19px;font-size:10pt;color:#000000;width:35%'><a href='Update_MsgContentMMS.aspx?BatchID=" + row["BatchID"].ToString() + "&Title=" + row["MsgTitle"].ToString() + "&Size=" + row["MsgSize"].ToString() + "' title='修改待发内容'>" + row["MsgTitle"].ToString() + "</a></td>";
html += "<td valign=top align=center style='height:19px;font-size:10pt;color:#000000;width:10%'><a href='MsgScheduleMsg_Detail.aspx?BatchID=" + b + "' title='待发列表'>" + row["submitCount"].ToString() + "</a></td>";
html += "<td valign=top align=center style='height:19px;font-size:10pt;color:#000000;width:15%'><table border='0' cellspacing='0' cellpadding='0' height='19px'><tr><td width=60><select id='list' style='display:none'>"
+ "<option value='高'>高</option><option value='中'>中</option><option value='低'>低</option>"
+ "</select><span>" + row["BatchPrior"].ToString() + "</span>"
+ "<input type='text' style='display:none' value='" + row["BatchID"].ToString() + "' /></td>"
+ "<td width=40><input type=button id='update' runat='server' value='修改' style='font-size:Smaller;height:19px;' onclick='UpdatePrior(this)'/></td</tr></table></td>";
html += "<td valign=top align=center style='height:19px;font-size:10pt;color:#000000;width:20%'>" + row["GenTime"].ToString() + "</td>";
html += "<td valign=top align=center style='height:19px;font-size:10pt;color:#000000;width:10%'>" + row["MsgSize"].ToString() + "</td>";
html += "</tr>";
最好用StringBuilder Append
一般都用StringBuilder 。