2012-04-22 55 views
0

你好的人,我坚持了如何使用AJAX工具包自动完成扩展到从数据库中获取的记录,我看了看下面:自动完成的Ajax工具包VB.NET ASPX

http://www.youtube.com/watch?v=2tZiVY8qs1c 
http://www.andreavb.com/forum/viewtopic_9310.html 
http://forums.asp.net/t/1626754.aspx/1 
http://www.programmersheaven.com/article/100738-Using+AutoComplete+in+the+AJAX+Toolkit+in+VB.NET/info.aspx 
http://www.ajaxtutorials.com/ajax-tutorials/using-autocomplete-in-the-ajax-toolkit-in-vb-net/ 
http://www.c-sharpcorner.com/uploadfile/cd3aa3/creating-auto-complete-textbox-using-autocompleteextender-control-of-ajax/ 

我不能似乎找到一个将帮助我使用asp.net数据库,而在这里显示的是所有网站驱动,而不是数据库。您可以请帮助我创建或指导我的教程,其中帮助我创建一个自动完成在vb.net aspx页2010使用数据库

我有一个表的测试数据库和表内的以下属性:

TESTID int PK 
Name nvarchar(100) 
LName nvarchar(100) 

谢谢你提供的任何帮助

编辑:

当我尝试添加(添加自动完成页面方法)我得到以下错误:

Unexpected error (TargetInvocationException); Exception has been thrown by the target of an invocation. 
at System.RuntimeMethodHandle._InvokedMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, [email protected], 

“它有很多更多,书写continutes”

当我按下OK

我的aspx页面会显示一个绿色的下划线下面的代码:

Partial Class _Default 
    Inherits System.Web.UI.Page 

Public Function GetComletionList() As System.String[] 

    End Function 

回答

0

您需要设置一个Web服务,返回数据。在此Web服务的vb代码中,连接到数据库并检索数据。

+0

我想添加一个(添加自动完成页面方法),但我得到一个错误,请看看我编辑的问题谢谢 – user1319420 2012-04-22 21:03:40