How to use jQuery to make a call to c# webservice to get return value
Posted
by aspdotnetuser
on Stack Overflow
See other posts from Stack Overflow
or by aspdotnetuser
Published on 2010-05-24T14:33:52Z
Indexed on
2010/05/25
9:21 UTC
Read the original article
Hit count: 269
I want to use jQuery to make a call to a c# web service called c.ashx which checks whether that username is valid and returns an error message as a string.
What should I put for data: and content type: if the return value of the c# webservice is a string value?
jQuery.ajax({
type: "GET",
url: "/services/CheckUserName.ashx",
data: "",
contenttype: "",
success: function (msg) {
alert("success");
},
error: function (msg, text) {
alert(text);
}
});
© Stack Overflow or respective owner