I'm having trouble inserting% of apostrophe% when I'm going to search for the '
component of AutoComplete
.
Jquery
$("#<%=txtHipotePai.ClientID%>").autocomplete({
source: function(request, response) {
$.ajax({
url: '<%=ResolveUrl("../ws/AutoComplete.asmx/GetListaHipotese")%>',
data: "{ 'prefixText': '" + 'pt-Br' +
"','idioma': '" + $("#<%=rblIdioma.ClientID%> :checked").val() + "'}",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function(data) {
response($.map(data.d, function(item) {
return {
label: item.split('#')[1],
val: item.split('#')[0]
}
}))
},
error: function(response) {
alert(response.responseText);
},
failure: function(response) {
alert(response.responseText);
}
});
},
select: function(e, i) {
$("#<%=hdfCodHipotesePai.ClientID%>").val(i.item.val);
},
minLength: 1
});