Implementing Ajax.NET-based Lookup Server Control

Michael Schwarz on Thursday, September 1, 2005

Michael Dubakov [1] wrotes on his blog:

AJAX [2] is one of the most popular buzz words today. Idea is not new, but for some reasons it became popular during last half a year. With web-applications popularity growth, users demand richer and faster interface. And AJAX could improve user experience.

Let me show one example of real user requirements. One of our customers need a way to quickly select user stories and bugs. For example, bugs could be linked to user story and there is a drop down for that purpose. But when you have about 100 items in drop down it is just unusable and lookup control makes selection simpler. That could be achieved via lookup control (like Google Suggest), so we decided to use AJAX in our product [3] to implement this features, improve user interface and make it more responsive. AJAX is completely new for me. I read some general articles about idea sometime ago, but didn't try anything due to lack of tools and ready to use libraries. However, recently I found Ajax.NET [4] – quite powerful framework that supports asynchronous callbacks. Examples are simple and I decided to use it to reach the goal.

In this article I'll describe my experience of creating lookup control based on Ajax.NET. To build lookup control you need quite a few things:

<li><font size="2">Server method that will return a list of matched records </font> <li><font size="2">JavaScript that will handle post-backs and show a list of matched records </font> <li><font size="2">Input field on aspx/ascx page.</font></li> I will not describe Ajax.NET installation, since it is very simple and there are some great [5] sources that you should check [6].


Read complete article at [7]