Im attempting to have a page that`ll allow the user to dynamically create resizeable dragpanels.First step is to create dynamically createable dragpanels. Following this ( http://www.imaginativeuniversal.com/IIIASPNETAjaxDynamicDragAndDrop.aspx )
I have a code that on clicking a button will generate a new panel 100 by 100px within my DIV area that is designed to contain the dragpanels.
Javascript in the page head :
<script type="text/javascript">
function createDraggableDiv() {
var panel= document.createElement("div");
panel.style.height="100px";
panel.style.width="100px";
panel.style.backgroundColor="Blue";
var panelHandle = document.createElement("div");
panelHandle.style.height="20px";
panelHandle.style.width="auto";
panelHandle.style.backgroundColor="Green";
panel.appendChild(panelHandle);
var target = $get('containerDiv').appendChild(panel);
addFloatingBehavior(panel, panelHandle);
}
function addFloatingBehavior(ctrl, ctrlHandle){
$create(Sys.Preview.UI.FloatingBehavior, {'handle': ctrlHandle}, null, null, ctrl);
}
</script>
ASPX C# Code :
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
</Scripts>
</asp:ScriptManager>
<ajaxToolkit:DragPanelExtender ID="DragPanelExtender1" TargetControlID="Panel1" runat="server">
</ajaxToolkit:DragPanelExtender>
<input type="button" value="Add Floating Div" onclick="createDraggableDiv();" />
<div id="containerDiv" style="background-color:Purple;height:800px;width:600px;"/></div>
do make them dragable according to the tutorial i need to add 2 scripts in the ScriptManager :
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Name="Microsoft.Web.Resources.ScriptLibrary.PreviewScript.js" />
<asp:ScriptReference Name="Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js" />
</Scripts>
</asp:ScriptManager>
but when i add them to my page i get the following error :
Assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' does not contain a Web resource with name
'Microsoft.Web.Resources.ScriptLibrary.PreviewScript.js'.
I went to C:/ProgramFiles/ Microsoft ASP.NET/ASP.NET 2.0 AJAX Extensions/v1.0.61025 and couldnt find the scripts, so my question is.... where do you get the two javascripts from? all help would be appricaiated! si!