i have a control i created behind code
Dim txtdate1 As New TextBox
txtdate1.ID = "txtdate1"
cell.Controls.Add(txtdate1)
Cell is a header table cell i added to a gridview.
I need to access this in javascript
var txtdate1 = document.getElementById('txtdate1');
OR
var txtdate1 = document.getElementById('<%=txtdate1.clientID');
How can this be done?
This is how the cell is created
Dim cell As New TableCell
Dim row As New GridViewRow(-1, -1, DataControlRowType.Separator, DataControlRowState.Normal)
row.BackColor = System.Drawing.ColorTranslator.FromHtml("#B5C7DE")
row.ForeColor = Drawing.Color.White
If GridView1.Rows.Count <> 0 Then
GridView1.Rows(0).Parent.Controls.AddAt(0, row)
Else
End If
row.Controls.Add(labelcell)
row.Cells.Add(cell)