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!

About the Author

Vladimir Enchev

is Director of Engineering, Native Mobile UI & Frameworks

Comments