O
Omid
Hi all,
This is probably a newbie question, but...
I have a custom control inherited from System.Web.UI.WebControls.Table. Here
is the code:
Namespace Test
Public Class PageHeader
`Inherits System.Web.UI.WebControls.Table
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim tblRow1 As New System.Web.UI.WebControls.TableRow
Dim tblRow2 As New System.Web.UI.WebControls.TableRow
Dim tblRow1Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow1Cell2 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell2 As New System.Web.UI.WebControls.TableCell
tblRow1Cell1.Controls.Add(New System.Web.UI.LiteralControl("<img
src=/help.gif></img>"))
tblRow1.Cells.Add(tblRow1Cell1)
tblRow1.Cells.Add(tblRow1Cell2)
MyBase.Rows.Add(tblRow1)
End Sub
End Class
End Namespace
When I put <test
ageheader> on my page the table appears, but the border
width is zero. I've tried to change it by calling
"MyBase.BorderWidth.Pixel(1)" but it's not working. Also
"MyBase.Attributes("border")=1". So my question is, PageHeader is derived
from Table web control, so how can I change the border width, cell padding,
border color, ...?
Thanks in advance,
Omid
This is probably a newbie question, but...
I have a custom control inherited from System.Web.UI.WebControls.Table. Here
is the code:
Namespace Test
Public Class PageHeader
`Inherits System.Web.UI.WebControls.Table
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim tblRow1 As New System.Web.UI.WebControls.TableRow
Dim tblRow2 As New System.Web.UI.WebControls.TableRow
Dim tblRow1Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow1Cell2 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell1 As New System.Web.UI.WebControls.TableCell
Dim tblRow2Cell2 As New System.Web.UI.WebControls.TableCell
tblRow1Cell1.Controls.Add(New System.Web.UI.LiteralControl("<img
src=/help.gif></img>"))
tblRow1.Cells.Add(tblRow1Cell1)
tblRow1.Cells.Add(tblRow1Cell2)
MyBase.Rows.Add(tblRow1)
End Sub
End Class
End Namespace
When I put <test
width is zero. I've tried to change it by calling
"MyBase.BorderWidth.Pixel(1)" but it's not working. Also
"MyBase.Attributes("border")=1". So my question is, PageHeader is derived
from Table web control, so how can I change the border width, cell padding,
border color, ...?
Thanks in advance,
Omid