命名空间“System.Web”中不存在类型或命名空间名称“Script”(是缺少程序集引用吗?)
using System;using System.Collections;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
/// <summary>
///自动完成
/// </summary>
[WebService(Namespace = "http://)]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class PhraseService : System.Web.Services.WebService {
public PhraseService () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
[WebMethod]
public string[] Get(string prefixText, int count)
{
phrase p = new phrase();
System.Data.DataTable dt = p.GetPhrase2(prefixText, count.ToString()).Tables[0];
string[] result = new string[dt.Rows.Count];
for (int i = 0; i < dt.Rows.Count; i++)
{
result.SetValue(dt.Rows[i][0].ToString(), i);
}
return result;
}
}
错误提示:错误 1 命名空间“System.Web”中不存在类型或命名空间名称“Script”(是缺少程序集引用吗?) F:\Inetpub\wwwroot\website\google\App_Code\PhraseService.cs 11 13 F:\...\google\