I am new to asp.net. Is there a better way to do the following code?
Dim Cell1 As New System.Web.UI.WebControls.TableCell
Dim Cell2 As New System.Web.UI.WebControls.TableCell
Dim Cell3 As New System.Web.UI.WebControls.TableCell
Dim Cell4 As New System.Web.UI.WebControls.TableCell
Cell1.Text = "cell1"
Cell2.Text = "cell2"
Cell3.Text = "cell3"
Cell4.Text = "cell4"
Table1.Rows.Add(New System.Web.UI.WebControls.TableRow)
Table1.Rows(Table1.Rows.Count - 1).Cells.Add(Cell1)
Table1.Rows(Table1.Rows.Count - 1).Cells.Add(Cell2)
Table1.Rows(Table1.Rows.Count - 1).Cells.Add(Cell3)
Table1.Rows(Table1.Rows.Count - 1).Cells.Add(Cell4)
Cell1.Dispose()
Cell2.Dispose()
Cell3.Dispose()
Cell4.Dispose()
I have a recordset that I am trying to add to display on the page. I
already have a table with some data in it. I am trying to append the
new data to. If there is a better way of doing this I would greatly
appreciate it.
Thanks again