I have come across a situation where it may be an advantage to use HtmlTableRow and HtmlTableCell. However, just a table with 7 rows and 6 columns can create a need to have 42 HtmlTableCells. And "Explicit Initialization" is not permitted with these objects. In other words you can't do this:
It has to be like this:
So can you imagine what it would be like doing 6 tables like this?
My question is, is there any way to create an array of this type of variable and then loop through it?
Otherwise, it would be easier to just create strings of HTML and loop through them and return a table to populate a label or a Session variable. I did this a lot when I programmed in classic ASP.
Code:
Dim C1, C2, C3, C4 As As New HtmlTableCell()
It has to be like this:
Code:
Dim C1 As New HtmlTableCell(), C2 As New HtmlTableCell()
Dim C3 As New HtmlTableCell(), C4 As New HtmlTableCell()
So can you imagine what it would be like doing 6 tables like this?
My question is, is there any way to create an array of this type of variable and then loop through it?
Otherwise, it would be easier to just create strings of HTML and loop through them and return a table to populate a label or a Session variable. I did this a lot when I programmed in classic ASP.