I mean .Net webservices with Webmethods.. i create .Net webservices that have webmethods so i can easily return entityframework entities as json strings.
all i do is make a .Net WebMethod, something like
<WebMethod()> _
Public Function GetCustomers(ByVal type As String)
Return (From c In db.customers Where c.Type = type)
End Function
Thats it.. that will return all cusomers of a "type" automagically as a json string, which i call from jquery like
$.ajax({
url:
"services/MyWebService.asmx/GetCustomers",
dataType: "json", contentType: "application/json; charset=utf-8",
type: "POST",
data: "{type: 'VIP'}",
success: function (response) {
loop through customers here
.... etc
Unless i am missing something, there is no way to call this with a get unless they except no params, as the params need to be posted?
dont get me wrong, using the ajax method is awsome and is not much effort to put in the extra options. But i cant believe im the only person who does this, and as i said before 90% of my calls are like this except when i use the load() method. so i can see where the first poster was coming from. A postJSON would be handy.
-Shane