try like this
Web Service c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace WebApplication135.services
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class VisiTracWS : System.Web.Services.WebService
{
[WebMethod]
public Location[] GetLocation()
{
List<Location> lst = new List<Location>();
lst.Add(new Location() { LocationID = 1, LocationName = "India" });
lst.Add(new Location() { LocationID = 2, LocationName = "Australia" });
lst.Add(new Location() { LocationID = 3, LocationName = "China" });
return lst.ToArray();
}
}
public class Location {
public int LocationID { get; set; }
public string LocationName { get; set; }
}
}
HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="Scripts/jquery-1.7.1.js"></script>
<script>
$(window).load(function () {
$.ajax({
type: "post",
data: {},
url: "services/VisiTracWS.asmx/GetLocation",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
var strSection = '<option value="0">Select Location</option>';
if (response.d.length > 0) {
for (i = 0; i < response.d.length; i++) {
strSection = strSection + '<option value="' + response.d[i].LocationID + '">' + response.d[i].LocationName + '</option>';
}
}
$('#ddlLocations').html(strSection);
},
error: function (response) {
alert(response.status + " " + response.statusText);
}
});
});
</script>
</head>
<body>
<select id="ddlLocations"></select>
</body>
</html>