c# - POST with single parameter returns 404 error -


I have to pass a single parameter in the web API POST method.

The following is my AJAX call:

  $ http ({method: 'POST', url: "customer / process customer / "+ Customer ID}) .Vivet (data) {});   

Where customerId is a grid .

and my Controller: [HTPP] [Route ("Customer / Processes Customer")] Public Zero Process Customer (Guide ID) {// Some Goods} < / Code>

But I do not get 404 when I do this get the error, am I doing wrong?

You are using attribute routing but you have the path to the id parameter In. Instead, use:

  [Route (see "Customer / Process Customer / {ID}"]   

For more examples.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -