<script type=”text/javascript”>
$(document).ready(function () {
$.ajax({ type: “POST”, url: “Index.aspx/GetCountriesName”, dataType: “json”, contentType: “application/json”, success: function (res)
{
$.each(res.d, function (data, value) { $(“#ddlNationality”).append($(“<option></option>”).val(value.CountryId).html(value.CountryName));
})
}
});
})
</script>
HTML:
<select id=”ddlNationality”><option value=”0″ >–Select Country–</option></select>