<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script language="VB" runat="Server">
Sub Page_Load(o As Object, e as EventArgs)
if Not IsPostBack then
dim da as SqlDataAdapter = new SqlDataAdapter("select * from authors", _
"server=localhost;database=pubs;uid=sa;pwd=;")
dim ds as New DataSet()
da.Fill(ds,"authors")
dim ds2(3) as DataSet
dim i as integer
for i=0 to ubound(ds2)
ds2(i) = ds.Copy()
next
Dim t as new Table
t.BorderWidth = Unit.Pixel(2)
for i=0 to ubound(ds2)
dim tr as new TableRow
dim td as new TableCell
td.Text = (i+1).ToString()
tr.Cells.Add(td)
td = new TableCell()
Dim dg as DataGrid= new DataGrid()
dg.DataSource = ds2(i).Tables("authors").DefaultView
dg.DataBind()
td.Controls.Add(dg)
tr.Cells.Add(td)
t.Rows.Add(tr)
next
form1.Controls.Add(t)
end if
End Sub
</script>
<form runat="Server" id="form1">
</form>