ajax 自动提示信息,自动提示使用AJAX

我想实现自动提示文本box.I已经检查了其他职位似乎没有任何要工作我,我无论是在Web应用程序试图与website.Please在我的代码计算outthe错误英寸当我在文本框中键入字母时,什么都不会发生。我可以在浏览器中看到webservice结果。自动提示使用AJAX

delete.aspx

Inherits="WebApplication2.Delete" %>

Assembly="AjaxControlToolkit"%>

Untitled Page

EnablePartialRendering="true"

runat="server">

TargetControlID="myTextBox"

ServiceMethod="Information"

ServicePath="~/WebService1.asmx"

OnClientItemOut="Information"

MinimumPrefixLength="1"

CompletionInterval="1000"

EnableCaching="true"

CompletionSetCount="5"

ShowOnlyCurrentWordInCompletionListItem="true">

webservice1.asmx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

namespace WebApplication2

{

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[System.ComponentModel.ToolboxItem(false)]

public class WebService1 : System.Web.Services.WebService

{

[System.Web.Services.WebMethod]

public string HelloWorld()

{

return "Hello World";

}

[System.Web.Services.WebMethod]

[System.Web.Script.Services.ScriptMethod]

public string[]Information(string prefixText)

{

RDFEntities db = new RDFEntities();

var allrows = from s1 in db.RDFMatch_v where s1.RIC.StartsWith(prefixText) select s1.RIC;

return allrows.ToArray();

}

}

}

2012-11-12

Radha

+1

我很想知道为什么你没有考虑jQuery自动完成。 –

+0

你能否给我提供链接,我会试试。 –

+0

http://jqueryui.com/autocomplete/ –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值