<% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " Default.aspx.cs " Inherits = " _Default " %> <% @ Register Assembly = " AjaxControlToolkit " Namespace = " AjaxControlToolkit " TagPrefix = " cc1 " %> <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.1//EN " " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd " > < html xmlns = " http://www.w3.org/1999/xhtml " > < head runat = " server " > < title > Untitled Page </ title > </ head > < body > < form id = " form1 " runat = " server " > < div > < asp:ScriptManager ID = " ScriptManager1 " runat = " server " > </ asp:ScriptManager > < cc1:DragPanelExtender ID = " DragPanelExtender2 " TargetControlID = " TargetPanel " DragHandleID = " DragHandlePanel " runat = " server " > </ cc1:DragPanelExtender > < asp:Panel ID = " TargetPanel " runat = " server " CssClass = " movablePanel " > < asp:Panel ID = " DragHandlePanel " runat = " server " CssClass = " handle " ToolTip = " 请拖拽此处 " > < h1 > 标题 </ h1 > </ asp:Panel > < div class = " content " > 这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板 < br /> 这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板这是 < br /> 内容面板这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板这是内容面板 < br /> </ div > </ asp:Panel > </ div > </ form > < script type = " text/javascript " > // 下面的程序代码是用来解决 FloatingBehavior 不允许我们将拖拽面板(DragPanel)固定于某处的问题。 function setBodyHeightToContentHeight() { document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) + " px " ; } setBodyHeightToContentHeight(); $addHandler(window, " resize " , setBodyHeightToContentHeight); </ script > </ body > </ html >