A
Anonymous
Hello,
in my init I am adding some controls into a
placeholder. The complete procedure looks like this:
Dim iLoop As Integer = 0
Dim table As New Table
table.BackColor = System.Drawing.Color.Gainsboro
table.CellPadding = 2
table.CellSpacing = 0
Dim tr As New TableRow
For iLoop = 0 To dsHeaderLinks.Tables(0).Rows
().Count() - 1
Dim td As New TableCell
td.ID = dsHeaderLinks.Tables(0).Rows(iLoop)
("ID")
If iLoop = 0 Then
td.Attributes.Add("class", "SelectedCell")
Else
td.Attributes.Add
("class", "UnSelectedCell")
End If
Dim link As New HyperLink
link.Font.Bold = True
link.Text = " " &
dsHeaderLinks.Tables(0).Rows(iLoop)("LinkText")
& " "
link.NavigateUrl = "/intranet" &
dsHeaderLinks.Tables(0).Rows(iLoop)("Link") & "?Index=" &
dsHeaderLinks.Tables(0).Rows(iLoop)("ID")
link.ToolTip = IIf(IsDBNull
(dsHeaderLinks.Tables(0).Rows(iLoop)("LinkTooltip")), "",
dsHeaderLinks.Tables(0).Rows(iLoop)("LinkTooltip"))
td.Controls.Add(link)
tr.Controls.Add(td)
Next
table.Controls.Add(tr)
HeaderMenuHolder.Controls.Add(table)
Now in my pageload I need to get access to the Tablecells,
so that I can set a new class for them. What would be the
best way to do that?
Thanks
in my init I am adding some controls into a
placeholder. The complete procedure looks like this:
Dim iLoop As Integer = 0
Dim table As New Table
table.BackColor = System.Drawing.Color.Gainsboro
table.CellPadding = 2
table.CellSpacing = 0
Dim tr As New TableRow
For iLoop = 0 To dsHeaderLinks.Tables(0).Rows
().Count() - 1
Dim td As New TableCell
td.ID = dsHeaderLinks.Tables(0).Rows(iLoop)
("ID")
If iLoop = 0 Then
td.Attributes.Add("class", "SelectedCell")
Else
td.Attributes.Add
("class", "UnSelectedCell")
End If
Dim link As New HyperLink
link.Font.Bold = True
link.Text = " " &
dsHeaderLinks.Tables(0).Rows(iLoop)("LinkText")
& " "
link.NavigateUrl = "/intranet" &
dsHeaderLinks.Tables(0).Rows(iLoop)("Link") & "?Index=" &
dsHeaderLinks.Tables(0).Rows(iLoop)("ID")
link.ToolTip = IIf(IsDBNull
(dsHeaderLinks.Tables(0).Rows(iLoop)("LinkTooltip")), "",
dsHeaderLinks.Tables(0).Rows(iLoop)("LinkTooltip"))
td.Controls.Add(link)
tr.Controls.Add(td)
Next
table.Controls.Add(tr)
HeaderMenuHolder.Controls.Add(table)
Now in my pageload I need to get access to the Tablecells,
so that I can set a new class for them. What would be the
best way to do that?
Thanks