how to get a control in a data cell using java script
Posted on 2014-07-25
Suppose my Java Script is iterating through a table row and cell
at a time. Meaning accessing the contents of each <td> cell.
I know that I can access the contents of the cell using innerhtml. That works
good when there is data in the cell.
However what if there is a control in the cell. Like a label control for example.
How would I access that control, so that I can get the id of the control?
You see when the java script is iterating through each cell, it has no idea if the
data in each cell is a control or just data, like "Hello World".
<Label id="Label1" Text="Label Control" runat="server"/>