Murray Brown
asked on
ASP.net VB.net Table border lines appearing when none set
Hi
The code below dynamically adds the following table to my ASP.net web age.
I have deliberately tried to add no border lines but there are lines appearing
What is causing this? How do I stop it?
Function oTableReport() As Table
Try
Dim rowCnt As Integer
' Current row count
Dim rowCtr As Integer
' Total number of cells (columns).
Dim cellCtr As Integer
' Current cell counter.
Dim cellCnt As Integer
Dim Table1 As New Table
rowCnt = 2
cellCnt = 3
Table1.GridLines = GridLines.None
For rowCtr = 1 To rowCnt
Dim tRow As New TableRow()
tRow.BackColor = Drawing.Color.Aqua
For cellCtr = 1 To cellCnt
Dim tCell As New TableCell()
tCell.Text = "Row " & rowCtr & ", Cell " & cellCtr
tCell.BackColor = Drawing.Color.Aqua
'tCell.ForeColor = Drawing.Color.Blue
' Add new TableCell object to row.
tRow.Cells.Add(tCell)
Next
' Add new row to table.
Table1.Rows.Add(tRow)
Next
Return Table1
Catch ex As Exception
MsgBox(ex.Message & " rew33")
End Try
End Function
The code below dynamically adds the following table to my ASP.net web age.
I have deliberately tried to add no border lines but there are lines appearing
What is causing this? How do I stop it?
Function oTableReport() As Table
Try
Dim rowCnt As Integer
' Current row count
Dim rowCtr As Integer
' Total number of cells (columns).
Dim cellCtr As Integer
' Current cell counter.
Dim cellCnt As Integer
Dim Table1 As New Table
rowCnt = 2
cellCnt = 3
Table1.GridLines = GridLines.None
For rowCtr = 1 To rowCnt
Dim tRow As New TableRow()
tRow.BackColor = Drawing.Color.Aqua
For cellCtr = 1 To cellCnt
Dim tCell As New TableCell()
tCell.Text = "Row " & rowCtr & ", Cell " & cellCtr
tCell.BackColor = Drawing.Color.Aqua
'tCell.ForeColor = Drawing.Color.Blue
' Add new TableCell object to row.
tRow.Cells.Add(tCell)
Next
' Add new row to table.
Table1.Rows.Add(tRow)
Next
Return Table1
Catch ex As Exception
MsgBox(ex.Message & " rew33")
End Try
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
The CSS border-spacing could be one of the rules.
Note: To determine what rules are applied to your table, run developer tools (Press F12) on your IE browser.