i have a control i created behind code\[code\] Dim txtdate1 As New TextBox txtdate1.ID = "txtdate1" cell.Controls.Add(txtdate1)\[/code\]Cell is a header table cell i added to a gridview. I need to access this in javascript\[code\]var txtdate1 = document.getElementById('txtdate1');\[/code\]OR\[code\]var txtdate1 = document.getElementById('<%=txtdate1.clientID');\[/code\]How can this be done?This is how the cell is created\[code\]Dim cell As New TableCellDim 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)\[/code\]