I am trying to use Andy Matthews autocomplete for jQuery mobile found here . My client service has a method that uses a parameter. I'm not sure how to change my client call to accept parameters?
Here is my client call:
//WHERE DO I PUT INPUT PARAMETERS?? $("#searchBox").autocomplete({ method: 'POST', target: $('#suggestions'), source: "ClientService.svc/REST/GetStates", link: 'target.html?term=', minLength: 1 });
Here is my service:
[OperationContract] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)] public List<string> GetStates(string y) { List<string> x= GetData(y); return x; }
source share