For ASP.Net, I know I can make a lot of different HTML elements runat=”server” so I can do specific things to it from the server, but I’m not able to get a TH to runat=”server”.
Why not?
example:
<table>
<tr>
<td id="tdMyCell" runat="server"></td>
<th id="thMyCell" runat="server"></th>
</tr>
</table>
but from server side, I’m only able to access the TD. I’ve tried to two lines below, the first won’t compile and the second always returns a null object.
thMyCell.Visible = false;
(this.FindControl("thMyCell") as System.Web.UI.HtmlControls.HtmlTableCell).Visible = false;
Update:
My fault, I copied something and I didn’t change it before I posted… it’s been fixed in the code
This might be a forehead slapper, but:
Because your th is called “thMyCell”, not “thLastColumn”