Monday, March 26, 2012

Updating an Update Panel on a page from Javascript

Hi All,

I am trying to update an update panel in a webform from Javascript. Form the documentation I think this might be possible using the Sys.Webforms.PageRequestManager but I have not been able to achieve this so far.

Any help would be greatful.

Hamlet

Hi Hamlet !

I been having the same wish ! After a lot of googeling the only way I found is to put an invisible button in a updatepanel and then raise it's postbackevent by registrering it's postbackevent in the scripthandler. Using the

$get('<%= YourControl.ClientID %>').click();

didn't work in FireFox and I supspect - but don't know for sure - not in ie7 ! One thing I wasted alot of time on was that the ValidateEventError but that was because I supplied an argument when registrering the clientscript in the scripthandler !

This feels like an uggly hack to accomplish what we want - but I didn't find any other way !

/MC24


I have been using

javascript:__doPostBack('__Page', 'some data' ) from the client.

This worked fine in the earlier release, but Beta 2.0 broke it because it started doing full postbacks instead of partial ones.

Evan


You can use the extender control I build.

http://daron.yondem.com

No comments:

Post a Comment