关注中,我只懂ASP的方法,不知道能不能在ASP.NET中实现,未做过,不过你可以试试,成功了给我分。ASP:<%while not rs.eof
i=i+1
%>
<tr>
<td><%=rs("id")%></td>
<td><%=rs("name")%></td>
</tr>
<% if i<rs.recordcount then %>
<%rs.movenext
i=i+1
%>
<tr>
<td><%=rs("id")%></td>
<td><%=rs("name")%></td>
</tr>
<%Else%>
<tr>
<td>无数据</td>
<td>无数据</td>
</tr>
<%End IF%>
<%rs.movenext%>
<%wend%>

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=D5C6E29D-99F5-44E8-4FED-75AF892A53CB
      

  2.   

    使用DataList,这个控件有RepeatColumns属性,用于在一个行或列里面要显示的记录项目数,缺省为0,表示列不重复(只显示1列)。另外,还需要设置RepeateDirection属性为Vertical或Horizontal,默认为Vertical,其作用为:
    当为Vertical时,每行显示RepeatColumns数的列,行数根据记录的数量自动变化。
    当为Horizontal时,每列显示RepeatColumns数的行,烈数根据记录的数量自动变化。
      

  3.   

    可以使用DataList,在DataList中可以加table,textbox等,显示起来很美观!