62,041
社区成员
发帖
与我相关
我的任务
分享
foreach (DataRow dr in ds.Tables[0].Rows)
{
if (i % 5 == 1)
{
strTable += "<div id='search_p_" + j + "' name='search_p_" + j + "' style='display: none'>";
j += 1;
}
strTable += "<table style='display: inline; width: 79px; height: 72px' cellpadding='0' cellspacing='0'>";
strTable += " <tr>";
strTable += " <td>";
strTable += " <div style='margin: 1px; padding: 1px; border-color: #E0E0E0; border-style: solid;border-width: 1px; width: 79px; height: 72px'>";
strTable += " <a target='_parent' href='Goods.aspx?id=" + dr["ProductID"] + "' title=''><img src='"+dr["PhotoUrl"]+"' border='0' alt='' height='77'></a>";
strTable += " </div>";
strTable += " </td>";
strTable += " </tr>";
strTable += " <tr>";
strTable += " <td align='center'>";
strTable += " <span class='price'>$" + Math.Round(Convert.ToDecimal(dr["PriceCuXiao"]), 2) + "</span>";
strTable += " </td>";
strTable += " </tr>";
strTable += " </table>";
if (i % 5 == 0)
{
strTable += "</div>";
}
i += 1;
}