hi RaviSant, As far as i know, u can use JSON format to return ur result from ashx
file. and in the .autocomplete
use options as parameter. like this.
var options, a;
jQuery(function(){
options = { serviceUrl:'GenericHandler.ashx' };
a = $('#query').autocomplete(options);
});
and in the web service class, return the JSON
format like this.
{
query:'Li',
suggestions:['India', 'Japan', 'United Kingdom', 'United States', 'Australia', 'France', 'China'],
data:['IN','JP','UK','US','AZ','FR','CH']
}
query
is the entered search key suggestions
is the list to display in dropdown data
is optional to use as value field when u select suggestion data from dropdown text To know more about JSON,here[^] To learn how to return JSON format from ashx
, here[^] Ref: I get this code from devbridge.com[^] Hope this works!
Please give any idea or suggestion on my advice.