Call ASP.NET PageMethod/WebMethod with jQuery - returns whole page

后端 未结 8 1089
北荒
北荒 2020-11-27 02:57

jQuery 1.3.2, ASP.NET 2.0. Making an AJAX call to a PageMethod (WebMethod) returns the full/whole page instead of just the response. A breakpoint on the page method shows

8条回答
  •  一向
    一向 (楼主)
    2020-11-27 03:10

    I encountered this problem again today for a different reason: I had misspelled "application" in

    contentType: 'application/json'
    

    And was getting a full-page response instead of a call to the WebMethod.

提交回复
热议问题