0
저는 현재 ajax autoCompleteExtender에 문제가 있습니다.간단한 asp.net autocompleteExtender가 작동하지 않습니다.
.ASPX
[System.Web.Script.Services.ScriptMethod]
[System.Web.Services.WebMethod]
public static string[] GetCompletionList(string prefixText, int count)
{
System.Diagnostics.Debug.WriteLine("prefix:" + prefixText);
List<string> list = new List<string>();
list.Add("hello");
list.Add("world");
list.Add("everyone");
return list.ToArray();
}
이 코드의 의도 된 행동이 문자열 값의 목록이에이 개 문자를 입력 할 때 반환 텍스트 상자의 드롭 다운을하는 것이었다 파일
<asp:toolkitscriptmanager runat="server" ID ="scropt" EnablePageMethods ="true" EnablePartialRendering ="true">
</asp:toolkitscriptmanager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" MinimumPrefixLength="2" TargetControlID ="TextBox1"
ServiceMethod="GetCompletionList" runat="server" CompletionInterval ="100"></asp:AutoCompleteExtender>
.Aspx.cs 파일 텍스트 상자. 그러나 이것은 일어나지 않습니다. 내 http 요청을 추적하기 위해 피들러를 사용하여 텍스트 상자가 서버에 대한 HTTP 요청을 실행하지 않는다는 것을 깨달았습니다. 누구든지이 문제의 원인을 알고 있거나 내 코드에 문제가 있습니까?
난 당신이 최신 AJAX 툴킷을 사용하여 toolkitscriptmanager..try의 오래된 버전을 사용하고 toolkitscritptmanager 대신 스크립트 관리자를 사용하여 생각 –
asp.net 스크립트 관리자 control.please로 확인하셨습니까?이 링크는 you.http : //www.aspsnippets.com/Articles/AJAX-AutoCom에 도움이 될 수 있습니다. pleteExtender-ASPNet.aspx의 예 –