Wednesday, March 28, 2012

Extender controls of type AjaxControlToolkit.DragPanelExtender cannot extend controls of t

Hi, I'm getting this error when trying to port an old Atlas Web App to use the latest bits - any help would be nice as to what controls I CAN extend - so if I can't use a DIV what then?:

Server Error in '/GRintranets' Application.

Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Source Error:

Line 368: {Line 369:// EnsureProfileScriptService(ScriptManager.GetCurrent(Page), true);Line 370: base.OnPreRender(e);Line 371:Line 372: if (Enabled && TargetControl.Visible)


Source File:E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs Line:370

Stack Trace:

[InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.] System.Web.UI.ScriptControlManager.VerifyTargetControlType(TExtenderControl extenderControl, Control targetControl) +262 System.Web.UI.ScriptControlManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +74 System.Web.UI.ScriptManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +104 System.Web.UI.ExtenderControl.RegisterWithScriptManager() +177 System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +17 AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:370 System.Web.UI.Control.PreRenderRecursiveInternal() +77 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

just use an <asp:Panel> control


Thanx Shawn - it works fine now but it doesn't seem to respect the z-index: 999 I'm assigning it (I tried through 'Style' and 'cssClass') - the thing is the window disappears behind other controls.

Could you say something useful about how to go to not let the draggable asp:Panel disappear behind the other page controls? I have explicit a very high value for the z-index but it won't stay on top. TIA

FYI, the page is loaded through AJAX in an iframe inside a table (on a page that uses a MasterPage), like this:

<tr><tdcolspan="10"style="height: 710px; width: 100%; z-index: 999;"valign="top"><!--content-->

<iframerunat="server"frameborder="0"id="ifContent"style="z-index: 999; width: 100%; height: 100%;"/>

<!--content--></td></tr>

Then, the page contains among other controls this combination of controls where I load content from a document in the iframe and make dragging possible through the inner asp:Panel:

<asp:Panelrunat="server"ID="pnlPaginaHTML"CssClass="cssPnlPaginaHTML"Style="z-index: 999">

<asp:PanelID="pnlLeer"runat="server"BackColor="Gray"Style="left: 12px; position: absolute; top: 5px; width: 828px; height: 16px"><spanstyle="font-size: 8pt"> se puede mover la ventana con el mouse rastreando la ventana en esta barra gris</span></asp:Panel><iframerunat="server"id="ifrPaginaHTML"src="#"scrolling="auto"style=" z-index: 999; left: 11px; width: 829px; position: absolute; top: 26px; height: 612px;"frameborder="1"></iframe></asp:Panel><atlas:DragPanelExtenderID="DragPanelExtender1"runat="server"TargetControlID="pnlPaginaHTML"DragHandleID="pnlLeer"></atlas:DragPanelExtender>

No comments:

Post a Comment