Hi Admir,
We ever archived this using "jquery.autocomplete.js" and add a handler in the module:
the script likes:
$("#<%=tbCity.ClientID%>").autocomplete("<%= ModulePath %>CityAutoCompleteAjaxAction.ashx", {
width: 226,
minChars: 2,
mustMatch: true,
autoFill: true,
selectFirst: false,
formatItem: function(data, i, n, value) {
return value + ", " + data[1];
},
formatResult: function(data, value) {
return value;
},
preventEnterSubmit: true
}).result(function(event, data, formatted) {
$('select.province').val(data[1]);
});
code in handler:
public void ProcessRequest(HttpContext context)
{
var q = context.Request.QueryString["q"];
if (q != null)
{
var cm = new CityController();
var cityString = cm.GetCitiesStringByPrefix(q);
context.Response.Write(cityString);
}
}
HTH
NovaSoftware ---a professional outsourcing company in China .
* More than 6 years' offshore experience in DNN
* Successfully developed 30+ websites , 250+ DNN modules, 50+ sets of Skins/Containers.
* Demo Site:
http://dotnetnuke.novasoftware.com/