Thursday, July 26, 2007

ModalPopup as an AJAX Progress Indicator

I recently read a dotnetkicks article where the author laid out an approach for using the ASP.NET AJAX client-side framework to synchronously execute a WebMethod that does some sort of server-side validation or computation. I believe the idea here was while this validation is executing the page designer does not want the end user interacting with the other elements on the page. I had not encountered this issue before, but I started working out how I would have approached it. I enjoyed the authors article and I liked how he leveraged the existing ASP.NET AJAX framework and that the solution should would work with the existing ASP.NET CustomValidator. Because the operation is synchronous, you can invoke the WebMethod from the ClientValidationFunction and set the IsValid bit to true or false depending upon the result. However, I am not sure if I would like having the page go unresponsive while this validation is taking place. Especially if it is unclear to me that the field I entered data into was going to require validation as I tabbed through to the next control.

Live Demo: Sample 1 | Sample 2 | Sample 3

Download: Sample Web Site


No comments: