Quote:
Note that you can replace "GetCompletionList" with a name of your choice, but the return type and parameter name and type must exactly match, including case.
try below
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static string[] ReturnTerritory(string prefixText, int count)
{
using (NovartisModel.NovartisEntities cntxt = new NovartisModel.NovartisEntities())
{
var res = from q in cntxt.tblTerritory where q.Territory_Name.ToLower().StartsWith(prefixText.ToLower()) select q.Territory_Name;
List<string> responses = new List<string>();
foreach(string item in res)
{
responses.Add(item);
}
return responses.ToArray();
}
}