473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Nov 18 '05 #1
2 1637
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

"Jay" wrote:
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

Nov 18 '05 #2
Jay
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.

"Jay" <kn*****************@hotmail.com> wrote in message
news:OX**************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ajay Desh | last post by:
Hi I am gettin error, if i try to find the top position of a table. Here is what i am doing.I have a HtmlTable (Table3 is the name/id) created.It has a position and a Top and Left co-ordinates...
1
by: Jeremy Ames | last post by:
Ok, so I am still trying to get use to ADO.Net, but I have come leaps and bounds to this point. I am trying to bind a dataset that I have returned from a webservice to a HtmlTable. It appears that...
2
by: Michael Meckelein | last post by:
Hi all! I have a table like Table myTable = new Table(); Now, I want to publish the table as part of a webpage and as part of a word document. I tried to convert the table, but the compiler...
6
by: Nehal Shah | last post by:
I've read that in the Page Directive of an aspx page, changing the CodeBehind attribute to Src saves you from having to compile the page before refreshing. This is preferable in a large...
1
by: Leo | last post by:
I created a user control which is some text contained in a HtmlTable. I put this control into main form. I would like to have the ability to move this control around in the main form. I think one...
1
by: TRobran | last post by:
What I'm trying to do seems pretty straightforward so I must be missing something simple. Any help is greatly appreciated. On my page I have a DropDownList, a HtmlTable and a Button. Each row...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
1
by: Antoine | last post by:
I have a pretty quickish question about ASPX with codebehind. I have done an exhaustive search of the web so no go there. I was hoping to reach out for some help here. Anyway, I have a really...
0
by: redaudi | last post by:
I'm hoping someone might be able to help me with the following issue. Basically I'm creating a htmltable on the fly and then simply populating it with rows and cells accordingly. My test site ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.