Ajax Control Toolkit ModalPopup

Modified on 2010/04/16 00:44 by Stephen Walther — Categorized as: Uncategorized

The ModalPopup extender allows you to display content in an element that mimics a modal dialog box, which prevents the user from interacting with the rest of the page. The modal content can contain any hierarchy of controls. It is displayed above a background (in z-order) that can have a custom style applied to it.

Clicking OK or Cancel in the modal popup dismisses the content and optionally runs custom script. The custom script is typically used to apply changes that were made in the modal popup. If a postback is required, you can allow the OK or Cancel control to perform the postback.

By default, the modal content is centered on the page. However, you can set absolute positiniong, and set only X or only Y to center the content vertically or horizontally.

ModalPopup Server Reference

The properties in italics are optional.

<ajaxToolkit:ModalPopupExtender ID="MPE" runat="server"
    TargetControlID="LinkButton1"
    PopupControlID="Panel1"
    BackgroundCssClass="modalBackground" 
    DropShadow="true" 
    OkControlID="OkButton" 
    OnOkScript="onOk()"
    CancelControlID="CancelButton" 
    PopupDragHandleControlID="Panel3" />



ModalPopup Client Reference

Sys.Extended.UI.ModalPopupBehavior Class


Events


Methods


Properties


Sys.Extended.UI.ModalPopupRepositionMode Enum


Fields

For