Language

[How Do I:] Use JavaScript to Refresh an ASP.NET AJAX UpdatePanel?

By Joe Stagner|10 minutes|
In this video we learn two different ways of using JavaScript logic to refresh the content of an ASP.NET AJAX UpdatePanel control. The first way is to add a Button-type server control to the UpdatePanel and use JavaScript to trigger an asynchronous postback and 'pretend' that the postback was caused by the server control inside the UpdatePanel. The second way does not require any Button-type server control to be added to the UpdatePanel, but still allows us to use JavaScript logic to refresh the content of the UpdatePanel. (The second technique was suggested by Dave Ward and you can read more on his weblog entry, " Easily refresh an UpdatePanel, using JavaScript ".)

DOWNLOADS: Code (C#)|Code (VB)|MP3|MP4|WMV

This article was originally created on July 25, 2007

Author Information

Joe Stagner

Joe Stagner – Joe has spent 10 years providing guidance to developers building web applications.