title: "Please Wait" message using jQuery or AJAX?
body: <p>I am creating an enterprise web template to be used for development of all our web applications. Many of our existing applications take a while to load because of the amount of data and geographic distance of the data source, so users frequently click the same buttons and links twice.</p>
  
  <p>I plan to add a <strong>Please Wait</strong> message to come up when the page is posting back. I figured there are two obvious ways to do this:</p>
  
  <hr>
  
  <p><strong>1. AJAX Tools</strong></p>
  
  <p>Using the AJAX <code>UpdatePanel</code> and progress loader, I can easily show a message on each postback with very little, if any, additional code.</p>
  
  <p>My concern with the AJAX method is that, because this is very generic template, I would have to wrap the whole page in an update panel. From experience with the ASP.NET 3.5 AjaxToolKit, the update panel affects postbacks and JavaScript code in funky ways. Also, I think UpdatePanels are heavy and increase the amount of time needed to load the session or application.</p>
  
  <p><strong>2. jQuery</strong></p>
  
  <p>Using jQuery, I can bind a method that shows the message to each <code>$(':submit').click() {}</code> event. The page would automatically hide the message by reloading at the end of the post back.</p>
  
  <p>I don't have major concerns with the jQuery method. It would require extra coding to work correctly with field validators. Not using the <code>UpdatePanel</code> also means the whole page is reloaded on every postback, which might not be the best method. It would also have to be delayed a few seconds before the 'Please Wait' message appears so that it doesn't appear for very small events that do not need such a message.</p>
  
  <hr>
  
  <p>Which is the better way to show a <strong>Please Wait</strong> or <strong>Loading</strong> message? I am concerned with speed and reliability, but if there are other measures of success that you feel are noteworthy, feel free to say so.</p>