Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

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>

Extender control ... cannot extend controls of type ...

Hi all,

I have a custom ImageButton that inherits from the standard ImageButton.

When I try to extend this button with ConfirmButtonExtender, I receive the following error:

Extender control 'cbeDelete' cannot extend 'ibDelete'.
Extender controls of type 'AjaxControlToolkit.ConfirmButtonExtender' cannot extend controls of type 'MyControls.ImageButton'.

Thx in advance

Any suggestions?

Even I am having same problem.

Extender control

Hi,

Can someone explain how the extender concept works? I like the fact that you can drop an extender on a page for a particular type and all types on the page will extend a couple of properties.

I would like to apply this to some other scenarios but I dont necessarily want to use ajax to do it.

How does this work?

Is the source code available to find out?

Regards

hello.

extenders will only wrap client side behaviors so that it's easier to associate them with page controls. in my opinion, you should only use them if you're using client behaviors and you want to define its properties from the server side.


I find the use for extenders limited / tedious though. Remember that one extender is required per control you want to extend.

If you want to extend the behaviour of the whole type without adding any controls, you should look into control adapters.


Ooops, forgot the URL to the atlas control toolkit. This is the best way (IMHO) to learn about the mechanics: http://www.codeplex.com/Project/FileDownload.aspx?ProjectName=AtlasControlToolkit&DownloadId=4059

I will investigate this further, thanks for the feedback!!!


Thanks, I will check it out.

Saturday, March 24, 2012

Exception: Either Path or Type must be set on a ServiceReference

I am getting an exception with the script manager on my page. I just would like some basic troubleshooting steps to elimate this problem.

Maybe what it means, what I should look for, etc.

StackTrace:

[InvalidOperationException: Either Path or Type must be set on a ServiceReference]
Microsoft.Web.UI.ServiceReference.GetProxyPath(Control control) +217
Microsoft.Web.UI.ScriptManager.GetScriptReferences() +847
Microsoft.Web.UI.ScriptManager.RenderXmlScript(TextWriter writer) +43
Microsoft.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +402
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +75
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6198

Hi Bill,

What does your <atlas:ServiceReference> look like? As the error message explains, it must have either a Path or Type attribute (in most cases, you want 'Path'). You may want to look through the quickstart for examples. e.g.here.

thanks,
David


I was manually creating my ServiceReference because it was wrapped inside a Custom Server Control. I just needed to set the Path attribute. I forgot all about that when I moved it from a page level declaration to a code level declaration.

Thanks for pointing that out!

bill

Wednesday, March 21, 2012

Errors after Installing RC1 and the Dec CTP

Getting this one again: The type or namespace name 'UI' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)

The following that I have checked:

1.) Made sure the System.Web.Extensions.dll was in the bin folder

2.) Copied and renamed the Web_CTP.config file to web.config and added it to my project

Anyone else hit this?

Make sure the dlls are in the GAC
Dropped them in the GAC, still no love.

Rick

Last step I know, check your web.confighttp://alpascual.com/blog/al/archive/2006/10/24/Manually-upgrading-from-Atlas-to-ASP.NET-2.0-Ajax.aspx


Little more information:

Created a new website for kicks on the same machine using the Ajax CTP Template. Works fine. Did a diff on the two web.config files and the only difference was:

<buildProviders>
<add extension="*.asbx" type="Microsoft.Web.Preview.Services.BridgeBuildProvider"/>
</buildProviders>

Took this out because it can only be placed in the top level of the site. Is there a problem with using this web.config file or adding AJAX specific settings in a folder below the root? I originally had all of this stuff in the top level web.config file, but was causing the problems described above so moved it ot the folder in which my ajax code was located.


It sounds like your referencing "Microsoft.Web" in your code somewhere (markup or code behind). The namespacing has all changed, so you'll need to modify all your existing references accordingly.
No references to that NS anywhere...
No references to that NS anywhere...
hello.

you're?talking?about?a?top?web.confg?file...are?you?saying?that?your?app?is?a?subdir?of?another?web?app??if?so,?then?you?should?make?sure?that?your?top?web?app?is?configured?to?use?asp.net?2.0?and?the?ajax?entries?should?be?put?in?that?top?condig?file.

another thing you should do: check for the scriptresourcehandler. make sure it's on your web?.config file. if this still doesn't solve your problem, use fiddler to see what you're getting from the server and then let us know.
MS changed the namespace in RC1 to System.Web.Extensions, this might be your problem. I had old statements in web.config from Beta 2 for Microsoft.Web.Extensions. I changed it to System and wham, it works. Give it a whirl.