Boardy Boardy - 1 year ago 109
ASP.NET (C#) Question

Fadeout/Darken background behind ModalPopupExtender in ASP

I am currently working on a ModalPopupExtender in with C#. I have the modal popup extender working fine but I was just wondering if there was a way to darken the background with some sort of animation to make the popup extender more noticeable.

Is there a form of JQuery or AJAX or something that would provide me with this sort of functionality.

Thanks for the help.

Answer Source

The CSS class you attach to the modal popup extender gives the background color.

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton2" PopupControlID="Panel2" BackgroundCssClass="modalBackground" OkControlID="OkButton1" OnOkScript="onOk()" CancelControlID="CancelButton1" DropShadow="true" PopupDragHandleControlID="Panel4" />

and in my CSS, I have


You can change the above CSS to darker shades of gray, if you want to. Else, you can experiment with the alpha & opacity properties.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download