Showing posts with label modalpopupextender. Show all posts
Showing posts with label modalpopupextender. Show all posts

Monday, March 26, 2012

Causing Async Postback after closing ModalPopup

Hey,

Im trying to make use of the ModalPopupExtender in order to allow the user to input some information and then have an UpdatePanel async postback to update with this new information. The key here would therefore be to Update the Panel right after closing the ModalPopup. This is where Im having some troubles. No matter what I cant get the UpdatePanel to postback after clicking Ok from the ModalPopup. As of right now, once you click Ok from the Modal, you have to hit refresh in order to see the results of the info... which kinda defeats the purpose of AJAX.

Thanks in advance for help!

Hi,

You can first add an invisible button on the form, and set it as the triggerfor the UpdatePanel.

Then, add a OnOkScript to the modalPopupExtender. In the script, call click on the invisible button. Like this: $get("id of the invisible button").click

So, whenever the modalPopup is closed via clicking on ok button, the UpdatePanel is able to update.

Hope this helps, and please feel free to let me know if there is any problem.

Saturday, March 24, 2012

CascadingDropDownList and ModalPopupExtender

I have created a ModalPopupExtender that contains 3 CascadingDropDownLists. The dropdowns work and are populated normally if I don't try and set a value. If I try and set a value for the first dropdown I get an ArgumentOutOfRangeException error. It seems like the value is trying to be set before the dropdown is populated. Does anyone know how I can fix this?

Thanks.

Nevermind. I got it.