【发布时间】:2011-03-11 10:31:52
【问题描述】:
我对 ASP.NET 中的自动完成扩展程序有疑问 - 它在我拥有的所有页面中都可以正常工作,但在母版页中却没有,我不知道为什么。
这是我的代码:
<asp:TextBox runat="server" ID="txtSearch" Width="200px" CssClass="TextBoxClass"></asp:TextBox>
<cc1:AutoCompleteExtender ID="txtSearch_AutoCompleteExtender" runat="server"
TargetControlID="txtSearch"
CompletionInterval="0"
CompletionListCssClass="autocomplete_completionListElement"
CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
CompletionListItemCssClass="autocomplete_listItem"
CompletionSetCount="10" EnableCaching="true" MinimumPrefixLength="2"
ServiceMethod="GetCompletionListOggetti"
ShowOnlyCurrentWordInCompletionListItem="true" UseContextKey="True">
</cc1:AutoCompleteExtender>
后面的代码:
<System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()> _
Public Shared Function GetCompletionListOggetti(ByVal prefixText As String, ByVal count As Integer) As String()
' Insert code to return a string array here…
Return AutoCompleteOggetti(prefixText)
End Function
问题是GetCompletionListOggetti 永远不会被调用。
我再说一遍 - 它在内容页面上运行良好!提前致谢。
【问题讨论】:
标签: asp.net vb.net autocomplete