Quantcast
Viewing all articles
Browse latest Browse all 5678

ModalPopupExtender background opacity not working with large pages

I have a Modal Popup Extender with opacity set for the background.  Everything works as expected.  However, when the page is large the opacity setting does not work – the background is solid.

Also on the page (as a test) is a div using the same CSS class and it works even when the page is large; only the modal background is affected.

Below is the HTML markup of my simple test page, followed by the page_load event of the code behind to which adds content to make the page large.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testempty.aspx.cs" Inherits="testempty" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        .bgdisable
        {
           position: absolute;
           background-color:red;
           filter:alpha(opacity=30);
           opacity: .3;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="bgdisable" style="width:100px; height:100px; left:50px">
       A stand alone div that works regardless of page size
    </div>
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Button ID="button" runat="server" Text="Show" />       
        <asp:Panel ID="panelPopup" runat="server">
            Test Content
        </asp:Panel>

        <asp:Panel ID="panelLargeContent" runat="server" />
   
    </div>

    <cc1:ModalPopupExtender ID="modalpopupextender" runat="server"
                TargetControlID="button" PopupControlID="panelPopup"
                BackgroundCssClass="bgdisable"
                X="132" Y="35">
        </cc1:ModalPopupExtender>
    </form>
</body>
</html>


Here is the page load event that adds content to a panel on the page to make the page big.
    protected void Page_Load(object sender, EventArgs e)
    {
        Int32 loops = 10000;
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < loops; i++)
        {
            sb.Append("ABC ");
        }

        Label l = new Label();
        l.Text=sb.ToString();

        panelLargeContent.Controls.Add(l);
    }

 

The variable 'loops' determines how much content is on the page.  At 10,000 I get the solid background and at 5,000 I do not.  I have experienced this problem on at least 3 desktops.  I have been told 1 machine does not have this behavior – it is never solid.  All machines are running IE8.

 

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>