在我的情况下,它是下列问题:
错误味精:与类定义[ScriptService]属性只有Web服务可以从脚本中调用。
尝试将[ScriptService]作为您的Web服务类的定义。 例如:
[WebService(Namespace = "http://dnndev/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[ScriptService]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class BusinessDataProvider : System.Web.Services.WebService
{
[WebMethod]
[ScriptMethod]
public string[] GetSpecificListOfContributors(string prefixText, int count)
{
return ContributorController.GetSpecificListOfContributors(prefixText, count);
}
}
我希望这一个会帮助你。
最好,
谢谢,我明白了@ Phantom – Gajawada 2013-04-22 04:12:18