Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-20
5
Medium Priority
?
221 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
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Manoj Patil
ID: 37743608
0
 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

879 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