1

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?

Ravi Shah
  • 843
  • 12
  • 29
  • 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 So all row are save in data table but without using any loop.
    nameDate
    test01/01/2018
    – Ravi Shah Jun 26 '18 at 12:10
  • 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
  • 1
    Why 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

0 Answers0