问题描述
AutoCompleteExtender在VS2005中调试时,Web页面中下拉框不显示WebService1.asmx代码///<summary>///SummarydescriptionforWebService1///</summary>[WebService(Namespace="http://tempuri.org/")][WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)][ToolboxItem(false)]//若要允许使用ASP.NETAJAX从脚本中调用此Web服务,请取消对下行的注释。[System.Web.Script.Services.ScriptService]publicclassWebService1:System.Web.Services.WebService{publicWebService1(){//如果使用设计的组件,请取消注释以下行//InitializeComponent();}[WebMethod]publicstring[]HelloWorld(){returnnewstring[]{"ab","abc","dsafdsa","weregads"};}}界面代码:<formid="form1"runat="server"><asp:ScriptManagerID="ScriptManager1"runat="server"/><div><asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><cc1:AutoCompleteExtenderID="AutoCompleteExtender1"runat="server"EnableCaching="true"ServiceMethod="HelloWorld"ServicePath="~/WebService1.asmx"TargetControlID="TextBox1"></cc1:AutoCompleteExtender></div></form>