joecool2005 Posted June 27, 2007 Share Posted June 27, 2007 Hi,I want to display my recordset inside a table. But it does not display properly. I don't know why.Thx <%@ Page Language="VB" AutoEventWireup="false" CodeFile="list.aspx.vb" Inherits="list" %><html><head></head><body><table border="1" cellspacing="0" cellpadding="0"><% Dim rsFSO As ADODB.Recordset = New ADODB.Recordset() Const adVarChar As Long = 200 With rsFSO.Fields .Append("name", adVarChar, 200) .Append("author", adVarChar, 200) .Append("title", adVarChar, 200) End With rsFSO.Open() rsFSO.AddNew("name", "a1") rsFSO.AddNew("author", "a2") rsFSO.AddNew("title", "a3") rsFSO.AddNew("name", "b1") rsFSO.AddNew("author", "b2") rsFSO.AddNew("title", "b3") rsFSO.AddNew("name", "c1") rsFSO.AddNew("author", "c2") rsFSO.AddNew("title", "c3") Dim i As Integer = 0 rsFSO.MoveFirst() While Not rsFSO.EOF i = i + 1 Response.Write("<tr>") Response.Write("<td>" + rsFSO("name").Value + "</td>") Response.Write("<td>" + rsFSO("author").Value + "</td>") Response.Write("<td>" + rsFSO("title").Value + "</td>") Response.Write("</tr>") rsFSO.MoveNext() End While rsFSO.Close() rsFSO = Nothing Response.Write(i)%></table></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.