Solved

How To Create Table Control From HTML Text...?

Posted on 2012-03-20
5
219 Views
Last Modified: 2012-04-23
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...
strHTMLCode = "<table style=""width: 100%;"">" &
              "    <tbody>" &
              "        <tr>" &
              "            <td colspan=""3"">Phone Call (Made) - 03/20/2012 [Ben]</td>" &
              "        </tr>" &
              "        <tr>" &
              "            <td style=""width: 50px;"">&nbsp;</td>" &
              "            <td style=""text-align: center; width: 20px; vertical-align: top;"">-</td>" &
              "            <td style=""width: 500px;"">Comment Goes Here</td>" &
              "        </tr>" &
              "    </tbody>" &
              "</table>"

Open in new window


...and I would like to do something like...
Dim objTable As New Table
objTable.LoadFromString(strHTMLCode)

Open in new window


Obviously I know there isnlt a LoadFromString() method on that object, but is there some equivalent to that type of process?
0
Comment
Question by:Ben Santiardo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Manoj Patil
ID: 37743642
0
 

Author Comment

by:Ben Santiardo
ID: 37748568
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!  :-)
0
 

Accepted Solution

by:
Ben Santiardo earned 0 total points
ID: 37861599
I never found an answer to this. Ended up building my own class to parse the HTML text.

Thanks for the input!
0
 

Author Closing Comment

by:Ben Santiardo
ID: 37879977
Found my own answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question