Linking HTMLTable to a CodeBehind variable?...Please help...

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have been trying to link and HTML Table to a Code behind variable. I have
seen people saying that they can do this but I cannot get it to work. What
am i missing?
In the HTML Code I have:
AutoEventWireup="true" in the serverside tags at the top of the file
....<Table ID="tLinks" runat="server">...</TABLE>...

In the code behind file I have:
Protected WithEvents tLinks as System.Web.UI.HTMLControls.HTMLTable

I then have a procedure I call when loading the page where I check the value
of tLinks and it is Nothing.

The end game its to be able to update the content of this table in an object
oriented way.
tLinks.Rows.Add(new HTMLTableRow) etc...

Thanks in advance,
-J
 
Use a asp.net server table control to do this. I don't think the regular HTML control can do this. I could be wrong
 
I found the problem. My HTMLTable was inside of a datalist and the id was
gets changed automatically for each row, once I moved it outside of the
datalist it worked.

Thanks anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top