Force update of an ASP.NET AJAX UpdatePanel using JavaScript Wednesday, July 18, 2007 by Vladimir Enchev | Comments 2 Email to a friend Since the beginning of ASP.NET AJAX era I have seen very few examples on how to manually force update of an ASP.NET AJAX UpdatePanel using JavaScript and I have decided to post very simple approach how to do this. First of all you will need to create your own UpdatePanel which will inherit from the original ASP.NET AJAX UpdatePanel and will implement IPostBackEventHandler interface: Now you can call explicitly Update() method of the UpdatePanel: ... and that's it! :-) ... however we can extend this control with an event which will be raised on explicit updates: Now you can use the new UpdatePanel in your pages like this: Enjoy! Vladimir Enchev, Senior Technical Architect Email to a friend 2 Comments Remco Ros 19 Jul 2007 thanks for sharing, great example! Dave 29 Jul 2007 You might consider doing it like this: http://encosia.com/index.php/2007/07/13/easily-refresh-an-updatepanel-using-javascript/ It's very easy that way. Comments Comment Apply CSS Class RadEditor hidden textarea RadEditor - please enable JavaScript to use the rich text editor. Name Click to add Email Click to add (optional, emails won't be shown on public pages) Your URL Click to add (optional) Read more articles by Vladimir Enchev - or - read latest articles in Developer Tools
Dave 29 Jul 2007 You might consider doing it like this: http://encosia.com/index.php/2007/07/13/easily-refresh-an-updatepanel-using-javascript/ It's very easy that way.