Last post Mar 30, 2016 09:48 AM by neilcoder
Mar 23, 2016 02:37 PM|neilcoder|LINK
I'm trying to get to grips with asp.net and ajax.
In php it's very easy to do this,
get the data from an html form in jquery and pass to php on the server
var postForm = $(this).serialize();
on the server in edit.php, get the values and update a database
$id = $_POST['edit_id'];
$field1 = $_POST['field1'];
$field2 = $_POST['$field2'];
then call a sql command and return a success/failure message.
Can this be done as easily in asp.net web api ?
Mar 23, 2016 03:04 PM|Nataraj Gandhi Arunachalam|LINK
Yes, it is pretty straight forward in Asp.net web api too. Please refer to the below post. It gives some good examples,
Mar 23, 2016 05:13 PM|neilcoder|LINK
Thanks very much. I'll check that out
Mar 24, 2016 02:27 AM|Yohann Lu|LINK
From your description, you can get the data from an html form in jquery and pass to asp.net web on the server.
The following tutorials for your reference.
Using jQuery to POST Form Data to an ASP.NET ASMX AJAX Web Service:
Posting Data With jQuery AJAX In ASP.NET Razor Web Pages:
Mar 30, 2016 09:48 AM|neilcoder|LINK
Thank you very much, checking these out