Showing posts with label imagebutton. Show all posts
Showing posts with label imagebutton. Show all posts

Monday, March 26, 2012

Modal Popup Problem Inside Multiview

I have a multiview with six views. Each view has a date field with a imagebutton beside it. When you click the imagebutton is should open a modal popup. The modal popup holds a canledar control. When I bring up this page with the multiview I get the following error: "Assertion Failed: Could not find an HTML element with ID "ImageButton ....." for control of type "sys.UI.Image".

I understand why I get this error, and that's because the imagebutton control exists on the second view that is hidden (because it works on the first view if it's the only one defined to use modal popup) . So then I tried to move the ModalPopupExtender to be within the views. Then when I move to the second view I get "null or not null object" error in the WebResource.axd line 110. The actual statement is "$(_CancelControlID).detachEvent('onclick', _cancelHandler);". I really need to get this working ASAP. If I can make this work with just the Popup (not Modal Popup) that would also be OK, but I have to call the popup from the ImageButton....

As you note, different panels of a MultiView are in many ways like completely separate pages. I like your idea of moving the MPE into the same view as the target control. Does that layout work if you remove the MultiView entirely? If not, then maybe it's something else getting in the way.

Saturday, March 24, 2012

Modal popup TargetControlID set to a control from within a DataGrid?

Can someone please tell me how to set the ModalPopupExtender TargetControlID property to an ImageButton control that is part of a template column of a DataGrid? The designer doesn't allow me to set it to the required control, and when I set it in the .aspx source I get a run-time error.

Thanks...

Hi,

Would you please post some code,so I can reproduce the problem and resolve it more quickly?

Thanks


A bit too much code to post. I have an ImageButton inside an DataGrid template column. The DataGrid is in a table. Outside the table I have a Panel and ModalPopupExtender, but I can't set it's TargetControlID to the ImageButton. I can set it to other ImageButtons in the table.