5

I am currently working on a ModalPopupExtender in ASP.net 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.

Boardy
  • 35,417
  • 104
  • 256
  • 447

1 Answers1

11

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

.modalBackground 
{
    height:100%;
    background-color:#EBEBEB;
    filter:alpha(opacity=70);
    opacity:0.7;
}

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

mbomb007
  • 3,788
  • 3
  • 39
  • 68
Anirudh Ramanathan
  • 46,179
  • 22
  • 132
  • 191