and thanks for reading my post..
I have a list which i use for databinding some repaters in my aspx.cs file. I'm now creating a autocomplete functionality where i need to use "AJAX Autocomplete for JQuery" (or simular...) to use this list (or.. atleast "id" and "name").
Issue is that i dont know how i through the aspx.cs file (preferrably a [WebMethod]) can "send" this list to the front-end, and use it for autocompleting.
Here is an example of the implementation...
With AJAX :
$('#autocomplete').autocomplete({
serviceUrl: '/autocomplete/countries',
onSelect: function (suggestion) {
alert('You selected: ' + suggestion.value + ', ' + suggestion.data);
}
});
Without AJAX :
var countries = [
{ value: 'Andorra', data: 'AD' },
// ...
{ value: 'Zimbabwe', data: 'ZZ' }
];
$('#autocomplete').autocomplete({
lookup: countries,
onSelect: function (suggestion) {
alert('You selected: ' + suggestion.value + ', ' + suggestion.data);
}
});
Anyone ?