c# - How can I transfer html table data to Jquery script in a way that I can save it in the sql database? -
i want table row data in below html code jquery data table in c#, can save in sql db.
how can this?
<table class="table table-bordered" id="table_gemlist"> <thead> <col style="width: 25%"> <col style="width: 25%"> <col style="width: 25%"> <col style="width: 25%"> </thead> <tbody id="gemlistbody"> <tr> <td>oval</td> <td>red</td> <td>2.23</td> <td><span class="glyphicon glyphicon-trash"></span></td> </tr> <tr> <td>oval</td> <td>red</td> <td>2.23</td> <td><spanclass="glyphicon glyphicon-trash"></span></td> </tr> </tbody> </table>
- iterate through table
<tr>s &<td>s via. jquery , create json array values. - post array server.
- at server: convert array
datatable. - save datatable directly sql database using
sqlbulkcopy.writetoserver
Comments
Post a Comment