Monday, March 26, 2012

Updating Controls outside of UpdatePanel on Partial Page Postback

Hi all - I apologize if this has been asked elsewhere. I searched and couldn't find it...

Anyway, I am having an issue where I am doing a partial page postback from a textbox located inside of an UpdatePanel. Based on what the user enters there I need to update a DropDownList located outside of the combo box using the SelectedValue property. When I do it using a normal ASP.NET PostBack without an Ajax UpdatePanel it works fine but when it is called inside of the Handler for the control inside an UpdatePanel it does not work. Is there some setting I need to change to get it to be able to update that control not inside of the UpdatePanel? Thanks for any help.

Don

Hi,

only the controls inside the refreshed UpdatePanel(s) get updated after a partial postback. If you want to update an external control, you should do it using JavaScript on the client side.


HI Garbin, thanks for the post. Actually what I did (and perhaps you were eluding to it) is I placed my DropDownList in its own UpdatePanel with the Update Mode as conditional. Then when my other control fires off and the value of the DropDownList needs to be set, I just set its value and call the Update() method of the UpdatePanel.

Works like a charm.

Thanks!

Don

No comments:

Post a Comment