ModalPopup Properties
The control above is initialized with this code. The display on the modal popup element is set to none to avoid a flicker on render. The italic properties are optional:
<ajaxToolkit:ModalPopupExtender ID="MPE" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="OkButton" OnOkScript="onOk()" CancelControlID="CancelButton" PopupDragHandleControlID="Panel3" />
- TargetControlID - The ID of the element that activates the modal popup
- PopupControlID - The ID of the element to display as a modal popup
- BackgroundCssClass - The CSS class to apply to the background when the modal popup is displayed
- DropShadow - True to automatically add a drop-shadow to the modal popup
- OkControlID - The ID of the element that dismisses the modal popup
- OnOkScript - Script to run when the modal popup is dismissed with the OkControlID
- CancelControlID - The ID of the element that cancels the modal popup
- OnCancelScript - Script to run when the modal popup is dismissed with the CancelControlID
- PopupDragHandleControlID - The ID of the embedded element that contains the popup header/title which will be used as a drag handle
- X - The X coordinate of the top/left corner of the modal popup (the popup will be centered horizontally if not specified)
- Y - The Y coordinate of the top/left corner of the modal popup (the popup will be centered vertically if not specified)
- RepositionMode - The setting that determines if the popup needs to be repositioned when the window is resized or scrolled.