Using Atlas ModalPopupExtender for displaying Modal content to the users
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


Share this post   Email it |  digg it! |  reddit! |  bookmark it!

Feedback

Posted on 6/12/2007 2:25:31 PM

Hi!!... when i try to do a postback my modalPopUp disappear, i need to do something when the user checks my chexbox,..but i can´t...please help me...tanks!!!!

Posted on 2/4/2008 3:44:08 AM

Hi,

i am using ModalPopup in my Page....when i click on any button..then Modalpopup is shows but after request is completed..the modalpopup is hang on screen...It hide after moving the mouse or pressing any key.....i don't why it happens....pls help me...it's urgent

Posted on 3/6/2008 4:31:50 AM

Angel,

I have the seem problem. Did you already find a solution for this problem?

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 
Copyright © 2006 - 2009 Vikram Lakhotia