In this Hello World example, we add a WaitIcon, sometimes also known as "Spinners", or "Throbbers", which will be displayed during the entire Ajax call.

To add the WaitIcon, you can define a DefaultWaitIcon in your form, passing in a WaitIcon object. At this point forward, every Ajax will, by default, use the defined wait icon to be displayed during your Ajax call.

This display can be overridden by either passing in null for the wait icon to your ajax action call, or alternatively you can pass in another WaitIcon object defined in your form.

Be sure to remember to render your wait icon on your page! (Note: artificial sleep/wait time has been added to the btnButton_Click method in order to illustrate the spinner in action)

Click the button to change my message.