By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Reading data into datasets

P: n/a
If I have String containing the code of a HTML <table> with data in it, can
a dataset read in the data thats contain in a HTML table?

If so, can someone show me.
Can this also be done with Comma Separated (csv) data?

Also, can someone show me to display the data in the dataset in HTML table?
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
If i understand you correctly, you have a mixed string of html with
data contained in <td> or <th> tags?


I'm not aware of any native feature that can 'extract' out the data
within the td tags of a table. You would most likely have to write a
custom data parser using some regular expressions (to make it less
code). To build up a custom arraylist.
From this arraylist you would then have raw data and be able to

populate a dataset. Once populating a dataset you should be there.

It's a lot of work to get the custom parsing right.

On the HTML side of things, there are a few ways of just dumping data
into a datagrid. You can use the wizard and it will take care of
populating a new table for you, however if you wanted to do something
more custom with your table you would need to write your data out like

<%# DataBinder.Eval(Container.DataItem, "FieldName") %>

You might want to goto and grab a free started kit, they are
easy to install and a great resource of source code. You'll
find good source on the datagirds and datasets there.

Unfortunately writing your own parser will take some time. But it can
be done, i just did a quick search and found these people that claim to
do that and more.

Good Luck

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.