Beyond simple data access and updates, presentation layers
generally present some more sophisticated user interfaces, intended to ease a
user’s workflow. One of the technologies to this end offered by MS AJAX is
behaviors. In fact, these behaviors are similar to DHTML behaviors, but they
are greatly improved because they are not limited to Internet Explorer. Built
using standard JavaScript, they work on all mainstream browsers. An MS AJAX behavior
attaches itself to DHTML elements using controls and dynamically changes the
behavior of the control based on this attachment.
For example, if you want to add drag-and-drop functionality
to a control, you can do this by attaching the appropriate behavior. Other
typical GUI enhancements such as tooltips, floating windows, and some
animations and visual effects can also be implemented as MS AJAX behaviors.
In the next section we will show you how to create a custom
behavior named MyHoverBehavior.