Ben Santiardo
asked on
How To Create Table Control From HTML Text...?
Is there a way to have a new Table control load a string that defines an HTML Table, that way I can manipulate the table in code, then re-write the HTML code out using the .RenderControl() method?
Here is my sample HTML string that I would want to load...
...and I would like to do something like...
Obviously I know there isnlt a LoadFromString() method on that object, but is there some equivalent to that type of process?
Here is my sample HTML string that I would want to load...
strHTMLCode = "<table style=""width: 100%;"">" &
" <tbody>" &
" <tr>" &
" <td colspan=""3"">Phone Call (Made) - 03/20/2012 [Ben]</td>" &
" </tr>" &
" <tr>" &
" <td style=""width: 50px;""> </td>" &
" <td style=""text-align: center; width: 20px; vertical-align: top;"">-</td>" &
" <td style=""width: 500px;"">Comment Goes Here</td>" &
" </tr>" &
" </tbody>" &
"</table>"
...and I would like to do something like...
Dim objTable As New Table
objTable.LoadFromString(strHTMLCode)
Obviously I know there isnlt a LoadFromString() method on that object, but is there some equivalent to that type of process?
ASKER
techChallenger1,
Thank you for the input, but that is not what I was looking for. I don't need to generate HTML code (I have the HTML code already), and I already know how to create dynamic tables server-side. What I need is to create a Server-Side object based on the HTML string representation of a table. Ultimately I wrote myself a custom class to handle what I need, but it's extremely limited and I know there may be scenarios where my code will not fuction properly because there are many variables I haven't accounted for.
If anyone knows of a better built-in way of getting what I need, please let me know! :-)
Thank you for the input, but that is not what I was looking for. I don't need to generate HTML code (I have the HTML code already), and I already know how to create dynamic tables server-side. What I need is to create a Server-Side object based on the HTML string representation of a table. Ultimately I wrote myself a custom class to handle what I need, but it's extremely limited and I know there may be scenarios where my code will not fuction properly because there are many variables I haven't accounted for.
If anyone knows of a better built-in way of getting what I need, please let me know! :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found my own answer.
http://weblogs.asp.net/nan