如何使ModalPopup拖

如何使ModalPopup拖

本文介绍了如何使ModalPopup拖/放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用ModalPopupExtender从阿贾克斯ControlToolkit在我Webapplication.I设置它的风阻属性为true,但是当我拖动弹出面板拖放在新的位置,它回来时once.I原来位置想得到这样的样品的效果,可拖动/下降在不同的位置上。如何在页面上的例子..

I use a ModalPopupExtender from the Ajax ControlToolkit in my Webapplication.I set it's Drag property is true,but when I drag the popup panel and drop it at the new position,it comes back the original position at once.I want to get the effect like the Sample, can drag/drop at different position. How in the example on the page ..

下面我code:

<form id="form1" runat="server">

    <asp:scriptmanager id="ScriptManager1" runat="server">
       </asp:scriptmanager>

       <asp:button id="btnAddNew" runat="server" text="New Expanse" />

       <asp:modalpopupextender id="ModalPopupExtender1"
                runat="server" cancelcontrolid="btnCancel"
                okcontrolid="btnOkay" targetcontrolid="btnAddNew"
                popupcontrolid="Panel1" popupdraghandlecontrolid="PopupHeader"
                drag="true" backgroundcssclass="ModalPopupBG">
      </asp:modalpopupextender>

<div class="popupConfirmation" id="Panel1" style="display: none">

        <iframe id="frameeditexpanse" src="Benutzer.aspx" frameborder="1" height="500px" width="520px">
        </iframe>

        <div class="popup_Buttons" style="display: none">
            <input id="btnOkay" type="button" value="Speichern" />
            <input id="btnCancel" type="button" value="Abbrechen" />
        </div>

</div>

PS:我想投入在后台文本框,如果对话框打开

PS: And I want input in the TextBoxes in the Background if the Dialog is open.

更新:

...

<asp:modalpopupextender id="ModalPopupExtender1"
                runat="server" cancelcontrolid="btnCancel"
                okcontrolid="btnOkay" targetcontrolid="btnAddNew"
                popupcontrolid="Panel1" popupdraghandlecontrolid="PopupHeader"
                drag="true" backgroundcssclass="ModalPopupBG">
      </asp:modalpopupextender>


   <div id="PopupHeader" style="display: none; background-color:Blue">
        Benutzerinformationen
   </div>

   <div class="popupConfirmation" id="Panel1" style="display: none">

    <iframe id="frameeditexpanse" src="ZweiteSeite.aspx" frameborder="1">
    </iframe>

    <div class="popup_Buttons" style="display: none">
        <input id="btnOkay" type="button" value="Speichern" />
        <input id="btnCancel" type="button" value="Abbrechen" />
    </div>

...

推荐答案

试试这个

<style type="text/css">
  .modalPopup
  {
    background-color: #ffffdd;
    border-width: 3px;
    border-style: solid;
    border-color: Gray;
    padding: 3px;
    width: 100%;
  }
</style>

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Button ID="btnAddNew" runat="server" Text="New Expanse" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="btnCancel"
        OkControlID="btnOkay" TargetControlID="btnAddNew" PopupControlID="Panel1" PopupDragHandleControlID="PopupHeader"
        Drag="true" BackgroundCssClass="ModalPopupBG">
    </cc1:ModalPopupExtender>
    <div class="popupConfirmation" id="Panel1" style="display: none">
        <asp:Panel runat="server" ID="PopupHeader" CssClass="modalPopup">
            **************** Drag me ****************
        </asp:Panel>
        <iframe id="frameeditexpanse" src="http://www.bing.com" frameborder="1" height="500px"
            width="520px"></iframe>
        <div class="popup_Buttons" style="display: none">
            <input id="btnOkay" type="button" value="Speichern" />
            <input id="btnCancel" type="button" value="Abbrechen" />
        </div>
</div>

这篇关于如何使ModalPopup拖/放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 13:02