Programming Microsoft ASP.NET 4 - Dino Esposito [456]
function OnEndRequest(sender, args)
{
if (typeof(currentPostBackElem) === "undefined")
return;
if (currentPostBackElem.id.toLowerCase() === "btnStartTask")
{
$get("btnStartTask").disabled = false;
}
}
Wouldn’t it be nice if you could visually notify users that a certain region of the screen has been updated? As you’ve seen, partial rendering improves the user experience with pages by eliminating a good number of full refreshes. If you look at it from the perspective of the average user, though, a partial page update doesn’t have a clear start and finish like a regular Web roundtrip. The user doesn’t see the page redrawn and might not notice changes in the user interface. A good pattern to employ is to use a little animation to show the user what has really changed with the latest operation. You can code this by yourself using the pair of beginRequest and endRequest events, or you can resort to a specialized component—an UpdatePanel extender control—as you’ll see in a moment.
Important