I am trying to create a ModalPopupExtender that can be saved on the main page or user control, and let me pass the panel and event to it and use this panel as a panel that will βslip outβ and the event as an event raised when the ok button is clicked.
I have been trying for some time using several different methods, but none of them worked correctly, and everything seems like they are not quite the right way to do this. These include:
- Adding a panel as a child control of another panel, which is a Popuptarget expander. This pops up in the right pane, but since the controls in the pane have been moved from the child page, it cannot be accessed in the event.
- Modifying the Extender Popuptarget is the panel that I want to post, and then added a dynamically created button with the correct event as the ok button. This reappears in the right panel and triggers the correct event, but the event can no longer access the controls in the panel.
So, if anyone can suggest a better way to do this or any articles where this has been done before, this will be appreciated. The reason I am doing this is because some of the pages that we have contain 20 different elements, which may require displaying to the user using modalpopupextender, adding an expander for each of them will be very tiring.
source
share