<script type="text/javascript" >
$(function () {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: 'WebServices/AutoComplete.asmx/GetCountries',
data: "{}",
datatype: "json",
async: true,
cache: true,
success:
function (data, event) {
$.map(data.d, function (item) {
// alert(item);
// $("#<%= drpCountry.ClientID %>").index = item.countryid;
// $("#<%= drpCountry.ClientID %>").val = item.countryname;
alert(item.countryname);
$("#<%= drpCountry.ClientID %>").append("<option value="+item.countryid+" >"+item.countryname+"</option>");
});
}
});
});
</script>