c# - recognize return value that get of web method in ajax-jquery -


I have written a web method, which contains string return value. This return value form is processed. But when the situation is not established, the undefined value returned. I wrote the following code but it is not working

  $ .ajax ({type: "POST", url: "WebForm1.aspx / confirm", data: JSON.stringify ( Content type: "Application / Jason; Charset = UTF-8", Data type: "Jason", async: true, cache: wrong, success: "username, password: password, email: email, codemail: codemile} Text (ret.d + ":" + "it is reserved" + ret.lenght);} and {$ ('#' (write = "") {$ ('# result'). Result '). ("Operation is successful")}}, error: function (x, e) {$ ('# result'). Text (x.responseText);}});    

should be ret.lenght ret D.length your success < / Code> in the callback.

Comments