Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
SQL
hi,

i used modelpopupextender control in asp.net. it works fine. in that control, there is property called cancelcontrolid="imgclose" . so, when i got poped up window i have to close that close button 'X' then only i can click other asp.net controls. but ,how to keep other asp.net controls to be active when we use medelpopextender control in asp.net.
Posted

The clue is in the name of the control - it displays a modal popup box
See this definition of a modal window[^]
If you want the other controls to be "active" - available - then you will need to use a different control to display your image
 
Share this answer
 
Comments
Maciej Los 11-Jan-14 15:05pm    
+5
You can try this simple trick

On the clientclick of the open popup buttton, using javascript you can set the popup div element style to be static..
note: i have used jquery..
example:

ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <style type="text/css">

    </style>
    <script src="jquery.js.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#Button1').click(function () {
                $('.ModalPopupBG').css('position', 'static')
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

        <asp:Button ID="Button1" runat="server" Text="Button" />

        <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server"
            CancelControlID="btnCancel" OkControlID="btnOkay"
            TargetControlID="Button1" PopupControlID="Panel1"
            PopupDragHandleControlID="PopupHeader" Drag="true"
            BackgroundCssClass="ModalPopupBG">
        </asp:ModalPopupExtender>

        <asp:Panel ID="Panel1" Style="display: none; height: 300px; width: 300px; background-color: yellow" runat="server">
            <div class="HellowWorldPopup">
                <div class="PopupHeader" id="PopupHeader">Header</div>
                <div class="PopupBody">
                    <p>This is a simple modal dialog</p>
                </div>
                <div class="Controls">
                    <input id="btnOkay" type="button" value="Done" />
                    <input id="btnCancel" type="button" value="Cancel" />
                </div>
            </div>
        </asp:Panel>

        <br />
        <asp:Button Text="Click outside popup" runat="server" />
    </form>
</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900