Search code examples
asp.netwebmethod

Jquery Ajax Call to WebMethod in asp.net


I am using JQuery to make an Ajax  call to a WebMethod. What file .asmx, aspx, or aspx.cs should I declare my WebMethod? Also how do I debug or step through my WebMethod? I notice that I cannot put a breakpoint in the WebMethod or maybe I am doing something wrong. Thanks !!! 


Solution

  • You should make WebApi instead, if you expect JSON or XML with jquery.ajax

    Check youtube, for example this one https://www.youtube.com/watch?v=6qwuFQDB2jU&index=2&list=PL6n9fhu94yhW7yoUOGNOfHurUE6bpOO2b