locked
No auto positioning of modal popup on scroll. RRS feed

  • Question

  • User-138772267 posted

     I have a scenario where i want to show a modal popup on click of link button. This link button is in gridview for each row item. Now, I am able to show the modal popup but when i scroll down, the position of modal popup is not maintained, it remains top on the page.

    RepositionMode="RepositionOnWindowScroll"

    Any thoughts, suggessions or any issue with the code.

    Thanks in advanced.

    Sumit.V

     

    My Code.

    CSS
    .watermark {
    	background: #FFAAFF;
    }
    
    .popupControl {
    	background-color:#AAD4FF;
    	visibility:hidden;
    	border-style:solid;
    	border-color: Black;
    	border-width: 2px;
    }
    
    .modalBackground {
    	background-color:Gray;
    	filter:alpha(opacity=70);
    	opacity:0.7;
    }
    
    .modalPopup {
    	background-color:#ffffdd;
    	border-width:3px;
    	border-style:solid;
    	border-color:Gray;
    	padding:15px;
    	width:250px;
    }
    
    .sampleStyleA {
    	background-color:#FFF;
    }
    
    .sampleStyleB {
    	background-color:#FFF;
    	font-family:monospace;
    	font-size:10pt;
    	font-weight:bold;
    }
    
    .sampleStyleC {
    	background-color:#ddffdd;
    	font-family:sans-serif;
    	font-size:10pt;
    	font-style:italic;
    }
    
    .sampleStyleD {
    	background-color:Blue;
    	color:White;
    	font-family:Arial;
    	font-size:10pt;
    }
    
    ASPX
    
    <asp:Panel ID="PanelWhy" CssClass="modalPopup" Style="display: none; ;"
        Width="400px" runat="server">
        <asp:Panel ID="PanelWhyMove" runat="server" Style="border: solid 10px #ffffdd; width: 98%;
            cursor: move;" />
        <label>
            Some Text.</label>
        
        <br />
        <div align="center">
            <asp:Button ID="OkButton" runat="server" Text="OK" />
        </div>
    </asp:Panel>
    <ajaxToolkit:ModalPopupExtender ID="MPEWhy" runat="server" TargetControlID="LinkWhy"
        PopupControlID="PanelWhy" BackgroundCssClass="modalBackground" DropShadow="true"
        Drag="true" OkControlID="OkButton" RepositionMode="RepositionOnWindowScroll"
        PopupDragHandleControlID="PanelWhyMove" X="300" Y="0" />


     

    Wednesday, October 7, 2009 1:09 AM

Answers