Dim numrows As Integer
Dim numcells As Integer
Dim i As Integer = 0
Dim j As Integer = 0
Dim row As Integer = 0
Dim r As HtmlTableRow
Dim c As HtmlTableCell
numrows = CInt(Text1.Value)
numcells = CInt(text2.value)
For j = 0 To numrows - 1
r = New HtmlTableRow()
If (row Mod 2 <> 0) Then
r.BgColor = "#afeeee"
End If
row += 1
For i = 0 To numcells - 1
c = New HtmlTableCell()
c.Controls.Add(New LiteralControl("行" & j + 1 & ",列" & i + 1))
r.Cells.Add(c)
Next i
table1.rows.add(r)
Next j
numrows = CInt(Text1.Value)
numcells = CInt(text2.value)这两行有错,谁帮下 vb我不懂