Joe Levi:
a cross-discipline, multi-dimensional problem solver who thinks outside the box – but within reality™

Day 2, High-Speed Development with the AJAX Control Toolkit

The AJAX Control Toolkit is an open-source, shared-source set of 34 (currently) controls that extend the functionality of Microsoft AJAX (and AJAX Futures for ASP.NET.

Autocomplete Extender

Extend your textbox by hooking it up to a datasource to search the datasource against what you’ve typed into the textbox, on the fly. Very nice.

GZIP, Gee Whiz!

ASP.NET AJAX enables browser-based GZIP unpacking on the fly — by default. So if you’re concerned about how much “stuff” is flying over the wire (even if you’re looking at a debugging tool to report bits transferred) be aware that the bits are compressed when they’re sent to the browser (resulting in about a 50% reduction in size). Once they the “stuff” is unpacked and loaded into the client browser. Sweet.

Modal Popup Control

This control lets you hook up a control (say a button or a link) and show some content (databound, or whatever) in a modal popup, this dims the background (disallowing interaction with anything in the background) and shows you just information relevant to your context. Cool.

Accordion Control

Good way to show data in a collapseable (and animatable) manner.

Update Panel Animation Extender

When you’re updating a panel asynchronously, sometimes the changes can happen so fast that the user may not realize that the data in the panel has changed (I haven’t had a problem with this yet, but, nonetheless). The Update Panel Animation Extender serves to provide an animation control to “style” the panel with an animation behavior (or several parallel animations should you so desire) to, say, fade out the old data, perform the update, and fade in the new data.

To test this out add a System.Threading.Thread.Sleep(1000); line to your code. This simply adds some time to the process. Of course its just for a development environment to simulate actual data connections where the user’s client browser is “far away” from the server that it’s getting its data from. You’ll want to remove that before you go live. 😉

Submit Disable Extender

This extender lets you disable your submit button asynchronously, which should help reduce duplicate clicks, or clicks that you don’t want until a set of parameters has been met. It can set the button as disabled, change the value of the button (the text on the button), etc.

One trick, however, if you set the button to disabled onSubmit, the form won’t be posted, why? The button’s disabled. That’s funny. But here’s how you get around it: window.setTimeout (function () {e.disabled = true;}, 10); This effectively sets the disabled property to fire 10 milliseconds after the submit event has fired.

Share

You may also like...

Leave a Reply