Hi
Earlier there was no way to show a Modal pop-up to the user in ASP.NET. The Atlas’s ModalPopupExtender allows the display of content in a modal manner (A modal pop-up stops the user interaction with the rest of the page till the modal pop-up is there. The content of the modal pop-up can be any number of control and HTML with CSS applied to them.
When the modal pop-up is displayed the user can only interact with the modal pop-up content. When the interaction with the pop-up completes then only the user can interact with the rest of the page. Custom script and post back can take place when the user completes the interaction with the modal pop-up.
The code to use the ModalPopupExtender looks like this.
<atlasToolkit:ModalPopupExtender ID="MPE" runat="server">
<atlasToolkit:ModalPopupProperties
TargetControlID="LinkButton1"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
DropShadow="true"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelButton">
</atlasToolkit:ModalPopupExtender>
Here the TargetControlID is the ID of the control, which will
activate the modal pop-up. The PopupControlID is the ID of the panel that will pop-up as
the Modal pop-up. The BackgroundCssClass is the CSS class that is applied to the
background when the Modal pop-up is displayed. The dropshadow property adds a drop
shadow to the pop-up. The OkControlID is the id of the control which dismisis the
modal pop-up and the CancelControlID is the id of the cacle button.
I have updated the Theme changer panel of my site to use a
modal Pop-up control. There are some radio buttons in the pop-up control that
can be used to change theme and also a cancel button, which will end the modal
pop-up if you d not want to change the theme.
Hope this helps
Thanks
Vikram