What is the best practice to convert html table data result to a new DataTable? I don't use any loop like for or foreach for every result item. There are any way in C# for copy table to Datatable?
Asked
Active
Viewed 466 times
1
-
Please post some code, what's your _"Html table"_ look like? – SᴇM Jun 26 '18 at 12:06
-
html table is simple tr td format. like
– Ravi Shah Jun 26 '18 at 12:10name Date So alltest 01/01/2018 row are save in data table but without using any loop. -
Do you mean https://msdn.microsoft.com/en-us/library/system.data.datatable(v=vs.110).aspx or https://datatables.net/ ? – mjwills Jun 26 '18 at 12:29
-
1Why the aversion to looping? If you want to do something to *n* things you need to do it *n* times. Here is an example use HAP: https://stackoverflow.com/questions/18090626/import-data-from-html-table-to-datatable-in-c-sharp – Alex K. Jun 26 '18 at 13:21
-
I m talking about https://msdn.microsoft.com/en-us/library/system.data.datatable(v=vs.110).aspx – Ravi Shah Jun 26 '18 at 13:37
-
I can't want to use looping. – Ravi Shah Jun 26 '18 at 13:39