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

James said:

The Link no longer works... any chance of an update? this looks like it could be useful.

# July 3, 2009 5:20 AM

Alejandro said:

# August 8, 2011 8:16 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)