while (mydr.Read())
{
picturehtml+="<tr align='center' valign='middle'><td width='75' height='64'><table width='54' height='54' border='1' style='border-collapse:collapse' bordercolor='09A5B7'><tr><td><img src='"+mydr["picture"]+"' width='50' height='50'></td></tr></table></td>";
picturehtml+="<td width='10' align='center' valign='middle'><img src='pic/point.gif'></td>";
picturehtml+= "<td width='75'> </td>";
picturehtml+="</tr>";
picturehtml+="<tr align='center' valign='middle'><td height='10' colspan='3'></td></tr>";
}
mydr.Close();
conn.Close();
picturehtml += "</table>";
以上是实现了竖排显示8张图片,我想实现一行2个,显示4行共8张图的效果,请问
该如何做呀?好象datareader自动移动光标到下一个记录,并且datareader也不支持
dr.movenext方法呀?我该怎么办?怎么办?20分奉送表心意~
{
picturehtml+="<tr align='center' valign='middle'><td width='75' height='64'><table width='54' height='54' border='1' style='border-collapse:collapse' bordercolor='09A5B7'><tr><td><img src='"+mydr["picture"]+"' width='50' height='50'></td></tr></table></td>";
picturehtml+="<td width='10' align='center' valign='middle'><img src='pic/point.gif'></td>";
picturehtml+= "<td width='75'> </td>";
picturehtml+="</tr>";
picturehtml+="<tr align='center' valign='middle'><td height='10' colspan='3'></td></tr>";
}
mydr.Close();
conn.Close();
picturehtml += "</table>";
以上是实现了竖排显示8张图片,我想实现一行2个,显示4行共8张图的效果,请问
该如何做呀?好象datareader自动移动光标到下一个记录,并且datareader也不支持
dr.movenext方法呀?我该怎么办?怎么办?20分奉送表心意~
for(int i=0 ; i<4; i++)
{
for(int j=0; j<2; j++)
{
mydr.Read();
Response.Write();
.............
}
}
2.用css实现
一般while(DataReader.Read()){}这样写至于显示效果,楼主可以用datalist很好控制