Asp.net 2.0 Ajax扩展器不起作用 [英] Asp.net 2.0 Ajax extender not working

查看:62
本文介绍了Asp.net 2.0 Ajax扩展器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要文本框的应用程序,我的用户将获得一个自动完成功能.


((((((1)))))))
我在Web服务中做了这段代码

i am developing an application where i need textbox where my users will get an autocomplete feature.


(((((1)))))))
I did this code in web service

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GetPlace : System.Web.Services.WebService {

    public GetPlace () {

        //Uncomment the following line if using designed components
        //InitializeComponent();
    }

    [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]
    public string[] GetPlace1(string prefixTex)
    {
        string[] s={"Hello World","abc"};
        return s;
    }

I expected this will pop up "Hello World","abc" but it does not show any thing. please help me



(((((2)))))))
and this for Control

           <asp:TextBox ID="txtCountry" runat="server" Height="25px" Width="395px">
                            <cc1:AutoCompleteExtender ID="AutoCompleteExtender1"  
                             MinimumPrefixLength="1"  runat="server" TargetControlID="txtCountry"
                               
                              ServiceMethod="GetPlace1" ServicePath="GetPlace.asmx"
                            >
                            





I expected this will pop up "Hello World","abc" but it does not show any thing. please help me

推荐答案

尝试以下操作:

AJAX AutoCompleteExtender [ C#中的ASP.NET AJAX自动完成示例 [ ^ ]

希望对您有所帮助:)
Try these:

AJAX AutoCompleteExtender[^]

ASP.NET AJAX Autocomplete example in C#[^]

hope it helps :)


这篇关于Asp.net 2.0 Ajax扩展器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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