怎样才能一行商品,一行广告的显示出来.我做的广告每一行都 一样
这段是代码,其中table是商品,table1是广告.table、table1中的数据是从后台数据库调出的
<%
int iCount = 0;
while (table1.MoveNext())
{
System.Data.DataRowView row1 = (System.Data.DataRowView)table1.Current;
while (table.MoveNext())
{
System.Data.DataRowView row = (System.Data.DataRowView)table.Current;
if (iCount % 4 == 0)
{
%>
<div>
<div style="float: left; margin-left: 6px;">
<a href="<%=row["picture"] %>" rel="sexylightbox[group1]">
<img height="403px" width="250px" src="<%=row["picture"] %>" alt="" style="border: none" /></a>
<div>
<%=row["id"]%>
</div>
</div>
<%
}
else if (iCount % 4 == 3)
{
%>
<div style="float: left; margin-left: 6px;">
<a href="<%=row["picture"] %>" rel="sexylightbox[group1]">
<img height="403px" width="250px" src="<%=row["picture"] %>" alt="" style="border: none" /></a>
<div>
<%=row["id"]%>
</div>
</div>
</div>
<div>
<img height="100px" width="1000px" src="<%=row1["picture"] %>" alt="" /></div>
<%
}
else
{
%>
<div style="float: left; margin-left: 6px;">
<a href="<%=row["picture"] %>" rel="sexylightbox[group1]">
<img height="403px" width="250px" src="<%=row["picture"] %>" alt="" style="border: none" /></a>
<div>
<%=row["id"]%>
</div>
</div>
<%
}
iCount++;