我已經通過谷歌給了我所有的答案,但它沒有幫助我的問題抱歉。 (同樣,那些#1給我,如果我寫的標題)... 這裏面有個<asp:Table>
AutoCompleteExtender沒有解僱
<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>
也是UpdatePanel的。
我Servicemethode應該罰款:
[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。
您的瀏覽器控制檯有JavaScript錯誤嗎? –
是的,還有一個問題,正如你可以在正確的答案中看到:)但是,謝謝。 – DatRid