Ajax experiences
I promised I'd write something about my AJAX experiences, so here goes:
I'm using AjaxPro, by Michael Schwarz. I'm using it so that people can quickly fill out a form without having to post back the whole page all the time. As you pick the details, it updates later parts of the form so that you're only prompted for the correct parts, and you don't have to keep posting back and reloading menus and stuff like that.
I have a textbox which has an event on it that calls an Ajax method, to populate a drop-down list. It's not a combo box, it's a list. That way, the user gets to see the whole list, not just a single entry. I could've returned a dataset from Ajax, but it was a heap easier to create the list in C# and then return the rendered HTML, which I apply to the InnerHTML property of a div tag.
I use the same rendering concept to display whole chunks of forms. It does mean that I need to handle the elements from Request.Form, because I'm dynamically generating the form elements, but I'm fine with that. It's only a form submission - it's not like I'm trying to handle various events.
The biggest problem I came across was form validation. I had some C# code which created a JavaScript function for validation. But it wouldn't get called by the browser. I took the validation code out of the function and put it directly into the form element event, and it worked just fine. I figure that the browser does something funky to know what functions are available, such that it doesn't like to introduce new functions after the page has loaded. Or something like that. I'm happy to wrong on this point - but I got it working nicely.
I like Ajax as a technology. The page works great under both Firefox and IE, and it seems really responsive. You can annoy it by changing the selected items really quickly, but to get around that I used a timer, so that it only puts the request in 0.1s after the user clicks. That way, a second click that's too quick doesn't stress it out too much. The problem seems to be with the client making too many requests, not the server handling it.