Print
Add To Favorites
Email To Friend
Rate This Article
|
Developing AutoComplete Textbox using ASP.NET AJAX 1.0, Web Service and JavaScript
|
Published:
26 Nov 2007
|
Abstract
This article explains how we can create a Textbox with AutoComplete feature using ASP.NET 2.0 Microsoft AJAX 1.0, Web Services and Javascript. We will see how we can expose a web service so that it can be invoked from a client side Javascript call. |
 |
by Jesudas Chinnathampi (Das)
Feedback
|
Average Rating:  
Views (Total / Last 10 Days):
24175/
468
|
|
|
|
| Introduction |
Invoking a web service method from JavaScript code (client
side) is the essence of this article. Due to the introduction of AJAX 1.0 extension for ASP.NET 2.0 invoking a web service method from client side can be
implemented with less lines of code. We can perform a variety of tasks
combining AJAX and Web Service. One of the techniques is to create an AutoComplete
Textbox using AJAX. To begin with, let us see how we can expose a web service
method that can be invoked from a client side JavaScript code.
|
|
|
|
|
Article Feedback
User Comments
Title:
Exemple AutoComplete
Name:
Jafrany
Date:
6/27/2008 3:42:54 AM
Comment:
Video : http://www.asp.net/learn/ajax-videos/video-122.aspx CodeScript: http://blogs.developpeur.org/cyril/archive/2007/10/16/autocomplete-keyvaluepair-identifiant-id-key-toolkit-autocompleteextender.aspx
;)
|
Title:
dsfsf
Name:
dsfs
Date:
4/15/2008 9:49:45 AM
Comment:
sdfsf
|
Title:
autocomplete
Name:
arun
Date:
4/10/2008 8:19:57 AM
Comment:
It is realy nice concept for Autocomplete
|
Title:
Developing AutoComplete Textbox using ASP.NET AJAX...
Name:
Balakrishnan
Date:
3/26/2008 3:18:24 AM
Comment:
Its good and light weight application to use in portal side...
|
Title:
Firefox Issue
Name:
vct
Date:
2/11/2008 5:56:56 PM
Comment:
a great article, its working fine in IE, but it's not working in Firefox. Is there anything else that I need to do to get it to work in Firefox?
|
Title:
mre description
Name:
eric
Date:
1/2/2008 2:18:48 PM
Comment:
PLease provide an example by merging everything together
|
Title:
Extended AjaxToolkit Control Autocomplete looks like facebook
Name:
Ray
Date:
12/19/2007 5:03:38 PM
Comment:
Browsing the asp.net website I found this autocomplete control which is exactly like facebook. Someone extended the ajaxtoolkit control to make it function exactly like facebook.
This is the persons blog. http://blogs.neudesic.com/blogs/pete_orologas/archive/2007/12/18/23739.aspx
This is where I found it. http://forums.asp.net/t/1195936.aspx
|
Title:
Its doesnt working properly
Name:
Thanigaimani
Date:
12/7/2007 5:35:47 AM
Comment:
Hi Your article is ver nice .thanx but i have one doubt. I get error in script manager tag,it display error for element script managar is not a known element,this is can occur in compilation time.. tel me how to use script manager tag..
Thanx
Reply me
|
Title:
Auto Complet WebService Through AJAX
Name:
Nitin Sharma Software Engineer
Date:
12/3/2007 11:21:58 PM
Comment:
Gud One ..!! :-) :-)
|
Title:
My variation of your code
Name:
Dan
Date:
12/3/2007 1:37:44 PM
Comment:
okay.. so I took what you made.. and I took code from a pure javascript textbox.. and I created my own based on the style of facebook's.
http://www.setlist.ca/fb/typeahead/
let me know what you think..
Also, just so you know, OnTimeOut is not used anymore. The timeout is combined in the OnError. Check out this page for more details:
http://dotnetslackers.com/columns/ajax/ASPNETAjaxWebService.aspx
|
Title:
It does not work in ASP Page
Name:
Neerman
Date:
11/29/2007 5:07:16 PM
Comment:
Hi , I have a textbox in ASP.NET and when I use the code for the textbox, it shows null values
|
Title:
AJAX Technology
Name:
Shailendra
Date:
11/29/2007 2:05:42 AM
Comment:
Gr8
|
Title:
good
Name:
suri
Date:
11/27/2007 5:05:43 AM
Comment:
u r expert
|
Title:
helloe
Name:
Devin Yang
Date:
11/27/2007 3:09:59 AM
Comment:
hello sir i want to get this feature
|
Title:
Re: okay.. I was mistaken.. sort of..
Name:
Das
Date:
11/26/2007 7:05:02 PM
Comment:
Dan,
I followed your steps and the autocomplete textbox is working correctly.
The dictionary that I have given in the example is not sorted. In my example, I am sorting the array before finding the next word. Hope this helps.
:-) Das
|
Title:
okay.. I was mistaken.. sort of..
Name:
Dan
Date:
11/26/2007 4:18:25 PM
Comment:
typing in Apple the first time works..
BUT
if you type in Apple, then backspace 5 times, and type in apple again, and repeat this process, you get some strange results.
I've been trying to find a perfect autocomplete solution. I found one, (which ISN'T AJAX) which is close to facebook's but it uses a static list. I'm going to try to combine that solution, with your AJAX one, and hopefully it is the best of both worlds.
|
Title:
It works !
Name:
Das
Date:
11/26/2007 3:36:31 PM
Comment:
Well, I was able to type in Apple. I will take a look at the Facebook's autocomplete feature ...
|
Title:
doesn't work propery..
Name:
Dan
Date:
11/26/2007 3:09:09 PM
Comment:
I checked out your demo.. try typing apple.. the second the 1 appears, it changes what I typed to a10.. also it took me 3 times to be able to type beer..
Facebook's autocomplete textbox is one of the best I've ever seen.. perhaps you should model your after that one..
|
|
|
|
|
|