all groups > asp.net building controls > february 2006 >
You're in the

asp.net building controls

group:

How can I create a HTMLTable class from and HTML string.


How can I create a HTMLTable class from and HTML string. chambersdon NO[at]SPAM hotmail.com
2/16/2006 6:59:34 AM
asp.net building controls:
I have an XMLReader loaded the HTML from a web page. I want to pull a
Table out of this XMLReader and use it to create an
HTMLControls.HTMLTable object.
How can I do this?

I should be able to do it without parsing the sting and explicitly
creating every row and column. This should work as if the table was
created in the designer using the runat=server attribute.

Don
RE: How can I create a HTMLTable class from and HTML string. DWS
2/16/2006 9:21:31 AM
I decided it was unethical but to get you rollin.

xmlreader.ReadToFollowing("table")
dim s as string
s = xmlreader.ReadElementContentAsString()
how you get s into a table is up to you. I think its the table inner html
and you can just set it mynewhtmltable.innerhtml = s you still have to walk
the attributes in node. table might be upper case too and the table node
would not be found. It might not even work at all.

Good Luck
DWS

[quoted text, click to view]
AddThis Social Bookmark Button