AutoComplete or Suggest Control for Ajax.NET
I have a new demo at http://munich.schwarz-interactive.de/autocomplete.aspx which will use a textbox and Ajax.NET Professional to search for customer names (1st textbox) and then for the orders of this selected customer (2nd textbox).
There is a big difference to other AutoComplet boxes. You can use any AjaxMethod to do your search. There is an example done with returning DataSets, default would be something like string[] (arrays). The second textbox is using the CustomerID from the first textbox, not the CustomerName. This is also very different to other controls. If you have a look in the source code you will find both controls and how they are rendering the lines.
I didn't test the control in all browsers, IE and Firefox should work.
Would be nice to get some feedback!! ;)
8 Comments
Comments have been disabled for this content.
Michael Schwarz said
You can use right-click, view source to get the source of the html code. The autocomplete.js is in folder /scripts, so you can download it directly.
Do you need the server-side code, too?
Michael Schwarz said
Yes, of course, I will add mouse support. I wrote this small script in some minutes, so please wait until the next days... ;)
Michael Schwarz said
The download will be included in the next release of the starter kit... Hopefully I can get this end of this week already.
AJAX.Pro Fan said
If you resize the window, the DIV with all possible choices is visible where the text box was located before I re-sized it.
Vince said
built my own page and got this: Microsoft JScript runtime error: Object doesn't support this property or method MS.Position.setBounds(this.div, r);
interactive said
Yes, of course you can do this. JavaScript code is available and you have to return the list you want to see. It is not a Ajax.NET behaviour, it is the method which will return the items.
Thomas Nystrøm said
I have the same problem as oren with the error in the first line inside autocomplete.js: addNamespace("MS.Web.AutoComplete"); why ?
Augusto Valero said
I have IE 6.0 and net.2.0 and it does not work. Can anyone help me ?