ここにあるjquery mobile に Andy Matthews autocomplete を使用しようとしています。私のクライアント サービスには、パラメーターを使用するメソッドがあります。パラメータを受け入れるようにクライアント側の呼び出しを変更する方法がわかりません。
これが私のクライアント側の呼び出しです:
//WHERE DO I PUT INPUT PARAMETERS??
$("#searchBox").autocomplete({
method: 'POST',
target: $('#suggestions'),
source: "ClientService.svc/REST/GetStates",
link: 'target.html?term=',
minLength: 1
});
これが私のサービスです:
[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;
}