0

In a .NET WebForms project we use a Ajax Control Toolkit 1.0.10123.0 ModalPopup. People who make use of our app would love us to make this popup window draggable. Unfortunately I am not able to accomplish this. I did find that the ModalPopupExtender might be of use, but I do not see anything happening. jQuery.draggable solution does work either since the ModalPopup translates into an IFrame and it does not drag in a smooth way.

Here's the code in the ModalPopup.Master page where I implemented aScriptManager and ModalPopupExtender:

<body onkeyup="catchEnter(event);">
<form id="form1" runat="server">
<div class="modalHeader">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <cc2:ModalPopupExtender ID="ModalPopupExtender" runat="server" BackgroundCssClass="modalBackground" Drag="true" DropShadow="true" 
            OnOkScript="onOk()" PopupDragHandleControlID="ModalHeaderLabel"
            PopupControlID="ModalHeaderLabel"
            TargetControlID="LinkPopupExtender" />

    <asp:Label ID="ModalHeaderLabel" style="color: #ffffff;"  runat="server" Text="" />
</div>
    <asp:ValidationSummary ID="ValidationSummary" runat="server" ShowMessageBox="False" />
    <asp:CustomValidator ID="cvGeneral" runat="server" Visible="False" />
    <asp:ContentPlaceHolder ID="ContentPlaceHolder" runat="server">
    </asp:ContentPlaceHolder>
    <asp:HiddenField runat="server" ID="LinkPopupExtender" />

</form>
</body>

When I add this the only noticeable effect is that the header text becomes invisible. Nothing is draggable.

I am not very experienced with classic ASP.NET controls and I hope someone more experienced can explain to me how I can make the Modalpopup draggable.

Community
  • 1
  • 1
user2609980
  • 10,264
  • 15
  • 74
  • 143
  • 1
    http://stackoverflow.com/questions/21955471/ajaxcontroltoolkit-modalpopupextender-drag-snap-back-to-center – Donal Aug 08 '14 at 16:30
  • Hi Donal, thanks but that is the new AjaxControlToolkit. We are using 1.0. But perhaps it can provide some insight. – user2609980 Aug 08 '14 at 16:32
  • Are you able to use something other than the AjaxControlToolkit? I'd suggest looking into jQuery UI. You can accomplish this very easily with jQuery. – Humpy Aug 08 '14 at 19:02
  • @Humpy, no. The whole application is build around user controls and this cannot be changed easily. – user2609980 Aug 09 '14 at 08:32
  • No one sees what wrong? Although I can look at the links provided, some more help would be greatly appreciated! – user2609980 Aug 10 '14 at 13:04

0 Answers0