I need to import a dynamic created HTML table to SQL server (using Visual Studio, C#). How can I do it? Maybe do you have articles/books? And the second problem is: will SQL database change when HTML table changes?
Asked
Active
Viewed 1,112 times
0
-
Where do you have that HTML table ? and did you write some code in C# to do that? – G_S Feb 17 '18 at 18:29
1 Answers
0
HTML table is nothing but a string. You can store it like any other string data. Better use NVARCHAR
as data type.
If your HTML is well formed you can even store it as XML in the database. Check this for more detail HTML as XML
You need to read the InnerHTML of the table using JavaScript . Post it to the server. Make sure that you encode the HTML before storing it.
Regarding any change in HTML table, you need to update it back to the DB.

PSK
- 17,547
- 5
- 32
- 43