I am working on an ASP web page that contains a HTML table with an id value. In the code behind file I want to toggle the visibility of the table but am not able to find a reference to it in intellisense. Here's a partial extract from the aspx file:
Code in the .cs file has no trouble referencing the labels or text boxes. Why am I unable to reference the "tblRegInfo" object? Must my table be of the asp:Table type in order for me to reference it in the C# file?
Steve
Code:
<table id="tblRegInfo" style="font-size:100%;height:36px; width:820px;" >
<tr>
<td align="right" class="style18">
<asp:Label ID="UserNameLabel" runat="server">Logon Name:</asp:Label>
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="txtUserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
</tr>
// Lots of additional rows with data elements in them.
</table>
Code in the .cs file has no trouble referencing the labels or text boxes. Why am I unable to reference the "tblRegInfo" object? Must my table be of the asp:Table type in order for me to reference it in the C# file?
Steve