How to send Datatable data to server
How to send Datatable data to server
elyamani
Posts: 2Questions: 1Answers: 0
I am using MVC.Net and i want to use Datatable in Add mode "i want to populate it with no data"
then the user will enter his data through textboxs then i want to send these data to the server to store it in DB
i googled for this issue , i didn`t find a solution
please, help.
This discussion has been closed.
Answers
Unless you are using Datatable's Editor then the responsibility of pushing data to a server is yours. Using jQuery Ajax is one option to post the data from the form to the server.
You can use
row.add()
to add the same data directly to the Datatable or you can useajax.reload()
to reload the Datatable after the data is submitted to the server.Kevin
i need exactly like the below link .... is it available to do the same with datatable ?
http://www.dotnetawesome.com/2014/08/how-to-insert-multiple-record-to-database-at-a-time-aspnet-mvc4.html
Hi @elyamani ,
That example isn't what DataTables does - that's not a table as such, it's just a form that gets posted to a server. The best bet would be to ask on StackOverflow or one of those other sites,
Cheers,
Colin