I have a table that I build in the code behind based on a dataset that i return.
I have the table working where it has one td in each row but what i want is to have three td's for each row.
now each td will contain the next record in the database which is a picture.
when the table is build i want to add a row then add 3 records from the database before i close the row and start another one.
sample code of what i have.
While myDR.Read
Dim x As Integer = 0
myThumbViewer = New ThumbViewer
myThumbViewer2 = New ThumbViewer
myThumbViewer3 = New ThumbViewer
myLabel = New Label
myLabel2 = New Label
myLabel3 = New Label
myRow = New TableRow
myCell = New TableCell
myCell2 = New TableCell
myCell3 = New TableCell
With myThumbViewer
.Height = "150"
.Width = "200"
.ModalFixedHeight = "300"
.ModalFixedWidth = "400"
.ModalImagePadding = "50"
.CssClass = "textboxbold"
.ImageUrl = "~/images/" & myDR("PhotoName")
.ThumbUrl = "~/images/" & myDR("PhotoName") 'Response.OutputStream.Wri
te(myDR("P
hoto"), 0, CInt(myDR("length")))
.Title = myDR("Description")
End With
With myLabel
.Text = myDR("Description")
.CssClass = "photodesc"
End With
'*************************
**********
**********
**********
*****
'With myThumbViewer2
' .Height = "200"
' .Width = "200"
' .CssClass = "textboxbold"
' .ImageUrl = "~/images/" & myDR("PhotoName")
' .ThumbUrl = "~/images/" & myDR("PhotoName")
' .Title = "Same as photo Descr2"
'End With
'With myLabel2
' .Text = "Sample Photo Description2"
' .CssClass = "photodesc"
'End With
''************************
**********
**********
**********
******
'With myThumbViewer3
' .Height = "200"
' .Width = "200"
' .CssClass = "textboxbold"
' .ImageUrl = "~/images/" & myDR("PhotoName")
' .ThumbUrl = "~/images/" & myDR("PhotoName")
' .Title = "Same as photo Descr3"
'End With
'With myLabel3
' .Text = "Sample Photo Description3"
' .CssClass = "photodesc"
'End With
'*************************
**********
**********
**********
*****
With myCell
'.ColumnSpan = 3
.Controls.Add(myThumbViewe
r)
.Controls.Add(myLabel)
End With
'With myCell2
' '.ColumnSpan = 3
' .Controls.Add(myThumbViewe
r2)
' .Controls.Add(myLabel2)
'End With
'With myCell3
' '.ColumnSpan = 3
' .Controls.Add(myThumbViewe
r3)
' .Controls.Add(myLabel3)
'End With
myCell.Controls.Add(myThum
bViewer)
myCell.Controls.Add(myLabe
l)
'myCell2.Controls.Add(myTh
umbViewer2
)
'myCell2.Controls.Add(myLa
bel2)
'myCell3.Controls.Add(myTh
umbViewer3
)
'myCell3.Controls.Add(myLa
bel3)
myRow.VerticalAlign = VerticalAlign.Top
myRow.Cells.Add(myCell)
'myRow.Cells.Add(myCell2)
'myRow.Cells.Add(myCell3)
'If x = 3 Then
myTable.Rows.Add(myRow)
' End If
With myLiteralControlBR
.Text = "<br>"
End With
x = x + 1
End While
Start Free Trial