Cascading autocomplete made easy
Over the last few days the API of the ScriptAculoUs.Net AutocompleteTextBox
control has changed pretty much, since I've switched from a custom implementation based on reflection to the ASP.NET built-in callback mechanism.
I chose to do the switch because the former implementation, despite being much more flexible, lacked in that it didn't let you exploit the ASP.NET Page intrinsic objects like Session, ViewState, and web controls values inside the body of the method which supplied the suggestions, since that instance of the Page was instantiated via Reflection and didn't run through the pipeline at all.
Today I'm lazy about updating the original post - which has become a "patched post" - with the new details, and I chose instead to create a quick screencast to illustrate how easy and straightforward is to implement a cascading autocomplete pattern using the control.
I haven't released the binaries of the new version yet, because I want to do some more testing before, but the source can be found on the SVN repository by the project homepage
Take a look at the screencast
, and please forgive a little mistake I did. When I populate the Cars collection I check for IsPostBack, but it made much more sense if I simply checked for nullness.