Hi Wesleymichel,
You can use $common.getLocation(DOM Element) to get its position. Here is the working sample.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="height: 300px; width: 250px; float: left; padding: 5px;">
<asp:Panel ID="Panel6" runat="server" Width="250px" Style="z-index: 20;">
<asp:Panel ID="Panel7" runat="server" Width="100%" Height="20px" BorderStyle="Solid"
BorderWidth="2px" BorderColor="black">
<div class="dragMe" ondrop="getDropPosition()">
Drag Me</div>
</asp:Panel>
<asp:Panel ID="Panel8" runat="server" Width="100%" Height="250px" Style="overflow: scroll;"
BackColor="#0B3D73" ForeColor="whitesmoke" BorderWidth="2px" BorderColor="black"
BorderStyle="Solid">
<div>
<p>
This sample uses javascript to reset its showing position when it is out of the limit area.</p>
<hr />
</div>
</asp:Panel>
</asp:Panel>
</div>
<ajaxToolkit:DragPanelExtender ID="DragPanelExtender1" BehaviorID="DragPanelBID" runat="server" TargetControlID="Panel6"
DragHandleID="Panel7"/>
<script type="text/javascript" language="javascript">
function getDropPosition(){
var currentPosition = $common.getLocation($get("<%=Panel7.ClientID%>"));
alert("x:"+currentPosition.x +"y:"+currentPosition.y);
}
</script>
</form>
</body>
</html>
I hope this help.
Best regards,
Jonathan