关键代码:

 1DragPanelExtender使用  <asp:ScriptManager ID="ScriptManager1" runat="server" />
 2DragPanelExtender使用        <ajaxToolkit:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID="Panel1" DragHandleID="Panel2">
 3DragPanelExtender使用        </ajaxToolkit:DragPanelExtender>
 4DragPanelExtender使用        <div>
 5DragPanelExtender使用           <asp:Panel ID="Panel1" runat="server" Width="250px" style="z-index: 20;">
 6DragPanelExtender使用                <asp:Panel ID="Panel2" runat="server" Width="100%" Height="20px"
 7DragPanelExtender使用                    BorderStyle="Solid" BorderWidth="2px" BorderColor="black">
 8DragPanelExtender使用                        <div class="dragMe">Drag Me</div>
 9DragPanelExtender使用                </asp:Panel>
10DragPanelExtender使用                <asp:Panel  ID="Panel3" runat="server" Width="100%" Height="250px"
11DragPanelExtender使用                    Style="overflow: scroll;" BackColor="#0B3D73" ForeColor="whitesmoke"
12DragPanelExtender使用                    BorderWidth="2px" BorderColor="black" BorderStyle="Solid" >
13DragPanelExtender使用                        <div>
14DragPanelExtender使用                            <p>This panel will reset its position on a postback or page refresh.</p>
15DragPanelExtender使用                            <hr />
16DragPanelExtender使用
17DragPanelExtender使用                        </div>
18DragPanelExtender使用                </asp:Panel>
19DragPanelExtender使用            </asp:Panel>
这个控件的用法比较简单,只要设置两个简单的属性,就可以实现拖拽功能。
TargetControlID:要实现拖放功能的目标
Panel ID
 DragHandleID:拖动处理Panel ID,当用户单击并拖动它的时候,目标控件将随着一起移动。

相关文章:

  • 2021-08-23
  • 2021-10-03
  • 2021-08-29
  • 2022-01-26
  • 2022-12-23
  • 2021-05-27
  • 2021-07-10
猜你喜欢
  • 2022-12-23
  • 2021-09-12
  • 2021-07-31
  • 2021-07-14
  • 2022-12-23
  • 2021-07-03
相关资源
相似解决方案