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

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 8/30/2007 8:34:02 AM

Hi Vikram,
Your blog is really good..both design & content..
I am also a .Net developer. I want to start a new blog, and have few questions..
Do you use any blog software?
Who is your blog host? Any suggestions for new blog..?
Thanks for your help.

Posted on 8/30/2007 9:27:15 AM

HI Vijay,

Thanks for the appreciation. For your questions.
I do not use any blogging software here. This one has been custom made by me.
If you want you can use wordpress software (its available for free) for your blog. I have myself used it and should say I am impressed.

Posted on 8/30/2007 5:53:56 PM

Vikram

Keep the good work going

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?

Posted on 1/17/2009 2:33:58 AM

Hi,
Can u clearly explain Lambda concept as I am a new folk to this .

Posted on 3/30/2009 10:04:57 AM

How can we get the value from the Lambda expression, please mail to me, if you can, thanks. Your blog is very good.

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 - 2010 Vikram Lakhotia