Hi, VageJoe:
Thanks for your response, but your input doesn't help me. As previously said, my Web API and the application aren't in the same project. Let's go bit by bit:
Firstly, I have to write a method in my web application ( the usser) to post the information from the jquery datatable to my web api (the server) My understanding is that I have to bind the DataTableAjaxPostModel to the FromForm attribute to "load" the data from the datatable ...right? . The code below is incomplete as I don't know what the server
[HttpPost]
[Route("Plots/Postdata")]
public async Task<JsonResult> Postdata([FromForm] DataTableAjaxPostModel model)
{
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage Res = await client.PostAsync("https://localhost:7193/api/Erven",don't know !!!);
{
//Storing the response details recieved from web api
var EmpResponse = Res.Content.ReadAsStringAsync().Result;
//Deserializing the response recieved from web api and storing into the Employee list
users = JsonConvert.DeserializeObject<List<ProgressreportReadonly>>(EmpResponse);
}
}
return => don't know
}
}
Secondly, in the another end, my external web api will receive this request