Force an UpdatePanel Update from JavaScript

by JoeStagner 7/11/2007 4:55:51 AM

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

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Related posts

Comments

7/11/2007 5:35:29 AM

Maybe I'm missing something, but isn't that just a really complex way of reinventing the PageRequestManager._doPostBack() wheel?

Dave

7/11/2007 5:53:18 AM

I always found it easier to put a button in the update panel - hide it via css (display='none') and the use the javascript from Page.ClientScript.GetPostBackEventReference(btnDoPostback, ""); to do the post back and refresh the update panel - the method used on code project looks horribly complicated.

Ross Dargan

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About your host.

Name of author Joe Stagner
?????

E-mail me Send mail

Calendar

<<  October 2008  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in