0
$("#<%=txtProduto.ClientID%>").on("focusout", function (event) {
event.preventDefault();
$.post(AjaxService.Pessoa(<%=txtProduto.ClientID%>), function (data) {
$("#<%=txtPrecoUnitario.ClientID%>").val(data);
});
});
I’m trying to call web service service via Ajax
, and this has parameters and should return me a value too.
The code above is what I tried but it doesn’t work.
Do you want to call a Webservice? You use C#?
– Marconi
yes it is in c#.. this is a web service
– hawk
I’ll assume you’re using a Webmethod, try removing $.post and passing the callback function as the second parameter of the AJAX method: Ajaxservice.Person(<%=txtProduct.Clientid%>, Function(result) { ... });
– Tobias Mesquita
You use asmx or WCF?
– Marconi