AutoComplete Extender无法在ascx页面中运行 [英] AutoComplete Extender is not working in ascx page

查看:89
本文介绍了AutoComplete Extender无法在ascx页面中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想通过使用Usercontrol(.ascx页面)在Autocomplete扩展程序中显示国家/地区

但它不起作用。已经尝试过web服务文件和ascx.cs文件中的代码

但方法没有解雇。



我需要解决方案。

Hi,

I want to display country in Autocomplete extender by using Usercontrol(.ascx page)
But its not working. Already Tried code in web service file and ascx.cs file
but method is not firing.

I need solution.

推荐答案

ASCX代码:

ASCX CODE:
<asp:TextBox ID="TextBox1" runat="server" CssClass="control"></asp:TextBox>
<asp:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" DelimiterCharacters=""

    Enabled="True" ServicePath="~/Search.aspx" ServiceMethod="GetCompletionList" TargetControlID="TextBox1" MinimumPrefixLength="2"

    UseContextKey="True">





aspx代码:



aspx code:

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string[] GetCompletionList(string prefixText, int count)
{
    VisualArchiveServiceClient client = new VisualArchiveServiceClient();
    string environment = ConfigurationManager.AppSettings["Environment"];
    return client.GetWildcardAutoComplete(environment, prefixText).ToArray();
}







工作正常......




its working fine...


这篇关于AutoComplete Extender无法在ascx页面中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆