我已经浏览了谷歌给我的所有答案,但它对我的问题没有帮助,抱歉。(如果我写标题,Stackoverflow也会给我)......它在里面<asp:Table>
<asp:TableCell>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UP3">
<ContentTemplate>
<asp:DropDownList runat="server" ID="SupplierDDL" Visible="false">
</asp:DropDownList>
<asp:TextBox runat="server" AutoPostBack="true" ID="tbSupplier">
</asp:TextBox>
<cc1:AutoCompleteExtender runat="server" ID="AutoCompleteExtender1" TargetControlID="tbSupplier" BehaviorID="skldjfa"
MinimumPrefixLength="2" EnableCaching="true" ServiceMethod="SelectAllManufacturer">
</cc1:AutoCompleteExtender>
<asp:HiddenField runat="server" ID="hfSupplier" /
</ContentTemplate>
</asp:UpdatePanel>
</asp:TableCell>
围绕这<asp:Table>
也是一个更新面板。
我的服务方法应该没问题:
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string[] SelectAllManufacturer(string prefixText, int count)
{
ArrayList filteredList = new ArrayList();
OracleConnection oracon = GlobalFunctions.DatabaseConnection();
OracleDataReader oradr;
oracon.Open();
OracleCommand oracom = new OracleCommand(Classes.SQL.SQL4global.selectSupplierBySearchString(prefixText.ToLower()), oracon);
oradr = oracom.ExecuteReader();
if (oradr.HasRows == true)
{
while (oradr.Read())
{
filteredList.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(
Convert.ToString(oradr["companyname"]) + " ** " +
Convert.ToString(oradr["street"]) + " * " + Convert.ToString(oradr["postalcode"]) + " * " + Convert.ToString(oradr["city"]) + " * " + Convert.ToString(oradr["land"]),
Convert.ToString(oradr["ID_Supplier"])));
}
}
oradr.Close();
oracon.Close();
return (string[])filteredList.ToArray(typeof(string));
}
它没有给我任何错误,只是没有激活 ServiceMethode。