in

ASP.NET Weblogs

This Blog

Syndication

News




NOTE: The opinions expressed here are MY OWN and are not necessarily those of my employer, partners, customers, friends, or family. ALL content presented AS-IS, for entertainment purposes only with ABSOLUTLY NO WARRANTY expressed or implied.

Joe On ASP.NET

Force an UpdatePanel Update from JavaScript

The ASP.NET AJAX UpdatePanel gets updated in one of 3 ways.

1.) An implicit control event triggers an update (that is a control inside the UpdatePanel is getting updated, etc.)

2.) The UpdatePanel has a <Triggers> Collection, and one of the defined triggers gets fired.

3.) The UpdatePanel’s Update metod is explicitly called in the course of some server side logic.

BUT…….  What if I want to explicity trigger an update to the UpdatePanel from my client side JavaScript code ???

Ceck out his link on CodeProject for a solution.

http://www.codeproject.com/useritems/UpdatePanelScriptExtender.asp

Comments

 

Wallace said:

Another option to cause an update panel to refresh is to call __doPostBack('{ClientID}',''); from your client script where {ClientID} is the client id of your UpdatePanel.

-Wallace

August 17, 2007 5:10 PM
 

Sipke said:

Wallace, that's a nice and easy solution. Thanks!

October 19, 2007 2:36 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About JoeStagner

Joe Stagner is a Senior Program Manager in Microsoft Corporation’s Developer Tools and Platform Group and has been with Microsoft since 2001 focusing on highly scalable and performant web application architectures, multiplatform interoperability and software security. Joe brings 30 years technical and business strategy experience to Microsoft which affords him a unique experiential perspective. [ I am NOT able to respond to PMs - please contact me via www.MisfitGeek.com ]