* Resolved - closed * ASP.NET newbie question about Table Control
Here is my issue. I have a table web form control (not the HTML table) on a webform. I build the table in code just fine. The question I have is I would like to add an effect to the table rows to change the backcolor of the row on mouseover and back to normal on mouseout.
How can I do this?
I know I have to do in in Javascript but...
Here is the code to add 2 rows each with one cell. I dont know where or how to insert the appropriate code to get the javascript to render.
Code:
Dim i As Int32
Dim x As Int32
With Table1
.BorderStyle = BorderStyle.Solid
.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1)
.BorderColor = System.Drawing.Color.LightSteelBlue
.CellPadding = 0
.CellSpacing = 0
.GridLines = GridLines.Horizontal
For i = 1 To 2
Dim tr As New TableRow()
.Rows.Add(tr)
tr.HorizontalAlign = HorizontalAlign.Center
tr.VerticalAlign = VerticalAlign.Top
Dim td As New TableCell()
tr.Cells.Add(td)
td.VerticalAlign = VerticalAlign.Bottom
td.HorizontalAlign = HorizontalAlign.Left
td.Width = System.Web.UI.WebControls.Unit.Percentage(79)
td.Text = "SomeText <br>"
Next
End With
Like I said I am adding the rows and cells programmatically so how do I get the javascript in?