ARTICLE

DragPanelExtender Control in Ajax

Posted by Rajesh Kumar Articles | ASP.NET AJAX in VB.NET September 19, 2011
DragPanel allow us to move the panel arround our web page in ASP.NET application.
 
Reader Level:

Introduction : The DragPanel Control allow user can frealy drag the panel arround on web page. Drag panel help user easily add draggability to their web page.

Properties of the DragPanelExtender Control.

  • TargetControl ID.
  • DragHandle ID.

With the help of this property user can drag the overall panel and web page.

Step : 1 Open visual studio and go to file menu.

  • Select WebSite option.
  • Select ASP.NET WebSite.
  • Default.aspx page open.
ASP-page1.gif

Step : 2 Go to SolutionExplorer and right click.

  • Select add new items.
  • Select WebForms option and add .
  • Drag and drop control in toolbox .
  • Write  code.
webforms.gif

Code :

<title> DRAG PANEL CONTROL</title>
</head>
<
body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:Panel ID="Panel1" runat="server" Width = "130 PX">
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" Height = "50px" Width ="50%" BorderStyle = "Solid" BorderColor = "Aqua">
        <div class ="DRAGME">drag control</div>
        </asp:Panel>
        <asp:Panel ID="Panel3" runat="server" Width ="160PX" Height ="150PX" Style = "OVERFLOW:SCROLL" BorderStyle = "Solid" BackColor ="#0B3D73">
        </asp:Panel>
 <div
>
<p>This panel will reset its position on a postback or
page refresh.
</p>
<
hr />
</div>
</
div>
<
div style="clear: both;"></div>
    <asp:DragPanelExtender ID="DragPanelExtender1" runat="server" TargetControlID = "Panel1" DragHandleID = "Panel2"/>
    </form
>
</body>
</
html>
Step : 3 Now press F5 and run the program.

drag-and-drop.gif

Login to add your contents and source code to this article
share this article :
post comment
 

Hi, This is really a nice article.

Posted by Vinit Kumar Sep 28, 2011
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Diagram
Become a Sponsor