Answer the question
In order to leave comments, you need to log in
How to solve the problem, does not see the controller's valuescontroller method?
I send a post request from the view to the ValuesController controller method
[AllowAnonymous]
[Route("api/values/PostClientIdInController")]
public string PostClientIdInController(Clients client)
{
........
}
$.ajax({
type: 'POST',
url: '/api/values/PostClientIdInController',
contentType: 'application/json',
data: JSON.stringify(client)
}).success(function (data) {
alert("Пользователь id отправлен");
}).fail(function (data) {
alert("В процесе отправки id польльзователя возникла ошибка");
});
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question