If you need to look for the tablecell according to its ID, here's a way that
will do it. It is much more efficient if you can just reference it by index
(such as tblrow.Cells(0) )
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim tblrow As TableRow
Dim tblcell As TableCell
Table1.GridLines = GridLines.Both
tblrow = Table1.Rows(0)
tblcell = tblrow.Cells _
(tblrow.Controls.IndexOf _
(tblrow.FindControl _
("inner_message")))
tblcell.Text = "Mr. X should use a friendlier name."
End Sub
"Mr. x" <a@b.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hello,
I have the following aspx code :
<form id = "main_form" runat = "server">
<asp:Table dir = "rtl" runat = "server">
<asp:TableRow>
<asp:TableCell id = "inner_message"> </asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
How can I change the contents of the value of TableCell in the server side
script ?
(What should I write in the following :
<script runat="server">
...
inner_message.innerHtml = "some message" ' doesn't work - what
should I put instead.
</script>
)
Thanks :)