首先,一个ScriptManager是必不可少的,不要忘记在其中引入AtlasUIDragDrop脚本文件,它不是Atlas默认加载的。
<atlas:ScriptManager ID="scriptManager" runat="server">
<Scripts>
<atlas:ScriptReference ScriptName="AtlasUIDragDrop" />
</Scripts>
</atlas:ScriptManager>
<div id="leftArea" class="list1">
<div id="content1" class="item">
<div id="content1Title" class="itemTitle">Content 1</div>
<div class="itemContent">
<asp:Login ID="myLogin" runat="server"></asp:Login>
</div>
</div>
<div id="content2" class="item">
<div id="content2Title" class="itemTitle">Content 2</div>
<div class="itemContent">
Dflying's Item
</div>
</div>
</div>
<div id="rightArea" class="list2">
<div id="content3" class="item">
<div id="content3Title" class="itemTitle">Content 3</div>
<div class="itemContent">
<asp:Calendar ID="myCalendar" runat="server" CssClass="centered"></asp:Calendar>
</div>
</div>
</div>
<div style="display:none;">
<div id="dropCueTemplate" class="dropCue">
</div>
<div id="emptyTemplate" class="emptyList">
Drop content here.
</div>
</div>
body, input {font-family:Verdana; font-size: 0.7em;}
.list1{width: 45%; float: left}
.list2{width: 45%; float: right}
.item{background:#fff;}
.itemContent{padding:5px;text-align:center;}
.itemTitle{background:#e5ecf9;font-weight:bold;cursor:move;}
.dropCue{border:dashed 1px #ff0000;}
.emptyList{text-align:center;}
<control id="leftArea">
<behaviors>
<dragDropList dataType="HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical">
<dropCueTemplate>
<template layoutElement="dropCueTemplate" />
</dropCueTemplate>
<emptyTemplate>
<template layoutElement="emptyTemplate" />
</emptyTemplate>
</dragDropList>
</behaviors>
</control>
<control id="rightArea">
<behaviors>
<dragDropList dataType="HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical">
<dropCueTemplate>
<template layoutElement="dropCueTemplate" />
</dropCueTemplate>
<emptyTemplate>
<template layoutElement="emptyTemplate" />
</emptyTemplate>
</dragDropList>
</behaviors>
</control>
<control id="content1">
<behaviors>
<draggableListItem handle="content1Title" />
</behaviors>
</control>
<control id="content2">
<behaviors>
<draggableListItem handle="content2Title" />
</behaviors>
</control>
<control id="content3">
<behaviors>
<draggableListItem handle="content3Title" />
</behaviors>
</control>