<asp:ScriptManager ID="ScriptManager2" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="search" runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender
TargetControlID="search"
ServicePath="WebService.asmx"
ServiceMethod="GetHotSearchByKeywords"
MinimumPrefixLength="1"
EnableCaching="true"
CompletionSetCount="10"
ID="AutoCompleteExtender1"
runat="server">
</cc1:AutoCompleteExtender>
----------------------------页面代码
[WebService(Namespace = " http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {
public WebService () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
[WebMethod]
public string[] GetHotSearchByKeywords(string prefixText, int count)
{
return new string[]{"3213","321","321321","3213","3213","3213"};
}
-=------------------webserver 代码
````````就是高不懂 提示不出来 高手指点 下哪里出错了