ASP AjaxToolKit自动完成扩展 [英] ASP AjaxToolKit AutoComplete extention

查看:60
本文介绍了ASP AjaxToolKit自动完成扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我尝试将新的Ajax工具包与Webforms一起使用,我尝试的第一个工具是自动完成功能.

我打开了一个新的Web项目,将webservice1.asmx添加到了该项目中,并使用了aspx Webform来获取此代码:

Hi

I tried to play with the new ajax toolkit with my webforms , the first one i tried is the autocomplete.

I opened a new web project , added webservice1.asmx to the project and aspx webform that get this code :

<<pre lang="xml">%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <cc:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
     <services>
    <asp:ServiceReference Path="~/WebService1.asmx" />
    </services>
    </cc:ToolkitScriptManager>
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <cc:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server"
        TargetControlID="TextBox1" ServicePath="~/WebService1.asmx"
        ServiceMethod="HelloWorld" MinimumPrefixLength="1"
        CompletionSetCount="1"
         EnableCaching="true"
        CompletionInterval="100">
        </cc:AutoCompleteExtender>

    </div>
    </form>
</body>
</html>




但是当我输入文本时什么也没有发生,如果我将"ServicePath"更改为具有相同值的"ScriptPath",则会收到Jscript错误.

如果有人能解决我,我会很高兴.
谢谢




but nothing happens when I enter text ,If i''m changing the "ServicePath" to "ScriptPath" with the same value , im getting Jscript error .

I''ll glad if anyone could solve it .
thanks

推荐答案

我认为这链接 [ ^ ]会帮助您
I think this link[^] will help you


这篇关于ASP AjaxToolKit自动完成扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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