Click here to Skip to main content
12,761,464 members (38,584 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET Javascript MVC
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( 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 26-Dec-12 4:01am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100