passing json string as parameter to webmethod

后端 未结 4 745
野性不改
野性不改 2021-01-21 00:29

I\'m making an ajax post to a webmethod EmailFormRequestHandler, I can see on the client side (through firebug) that status of the request is 200 but it\'s not hit

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-21 01:11

    You mean you want to set a break point? Don't set that point in firebug. Set that breakpoint in VS itself. Then attach VS to local IIS.

    By the way, in your ajax call you set three parameter, your webmethod takes only one. and the parameter name must be the same.

    The format of your data attribute in the ajax call is also not good. It should look like this

    data: '{"to":"bfleming@allegisgroup.com","from":"bfleming@test.com","message":"sdfasdf"}',
    

    it should be framed in ' '

提交回复
热议问题