D
dageyra
I have an HTML server control such as:
<table>
<tr>
<td id="someID1" runat="server"></td>
<td id="someID2" runat="server"></td>
</tr>
</table>
The user has been filling out a multipage form that corresponds to
someID1 and someID2, and I now want to fill in the cells with their
input:
someID1.innerHTML = "string of answers"
someID2.innerHTML = "string of answers"
However, I'm using a loop for this, meaning that someID1 and someID2
will be variable. I am now traversing through the controls on the page
like so:
Dim c as Control
actions = Session("actions")
For Each c In Controls
If (IsInArray(c.ID, actions)) Then
...
End If
Next
Inside the inner If loop, I want to use the Control c to set the
innerHTML or innerText. Is this possible? I have the MSDN reference
for control, but I'm not sure which property/method I can use to do
this. Basically, if the ID of the control is found in actions, I want
to perform operations on it just as if I did
someID.innerHTML = "some text"
<table>
<tr>
<td id="someID1" runat="server"></td>
<td id="someID2" runat="server"></td>
</tr>
</table>
The user has been filling out a multipage form that corresponds to
someID1 and someID2, and I now want to fill in the cells with their
input:
someID1.innerHTML = "string of answers"
someID2.innerHTML = "string of answers"
However, I'm using a loop for this, meaning that someID1 and someID2
will be variable. I am now traversing through the controls on the page
like so:
Dim c as Control
actions = Session("actions")
For Each c In Controls
If (IsInArray(c.ID, actions)) Then
...
End If
Next
Inside the inner If loop, I want to use the Control c to set the
innerHTML or innerText. Is this possible? I have the MSDN reference
for control, but I'm not sure which property/method I can use to do
this. Basically, if the ID of the control is found in actions, I want
to perform operations on it just as if I did
someID.innerHTML = "some text"