c# - Ajax posting method succeed but error method fire -


i sending msg mobile using ajax posting . receive msg fire error method not success. , should pass in data parameter.? here code ....

var sendurl ="here send msg url";         $.ajax({             url: sendurl,             type: 'post',             data: "",                                 success: function (data) {                 alert("success");                                    },             error: function (e) {                 alert("fail");             }         });         $('#txtmobileno').val(''); 

in data property in ajax options want send object or value matches server side params posting to. data param in success function data returns server code when call successful. error function being called because posting method requires parameter passed in aren't supplying 1 (your data property in ajax options).


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -