Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am using backbone.js.I have a backbone model. I just want to simply call the destroy function to call the delete method in controller(asp.net MVC). The delete call occurs but the values that i set for the model doesn't pass to the controller. Can somebody suggest me a solution for calling the destroy function??
Posted

1 solution

Use IE9 Developer toolbar or Fiddler to see what is passed from the browser to the server. You can set a breakpoint in server side code to see, what you have in the request. I don't know how backbonejs api is formatting the fields, but be aware, that it is making a DELETE http request, not post or get (so, both iis, and the action has to be prepared to handle it). After you have found how the fields are passed in the request body, you can shape your action parameter list accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900