Showing posts with label latest. Show all posts
Showing posts with label latest. 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 "Tasks" popup in VS2005

Hello,

the latest update for the controlkit shows a "Tasks" popup for many extenders in VS2005. For example the NumericUpDownExtender shows "Add GetNet NumericUpDown page method" in that popup.

When i select such an item i get a message that no codefile can befound and no method is added.

Is that a known problem, is my installation broken or is that not supposed to add a method to my current code behind? (maybe i need to setup a webservice to place the method there?)

Thanks in advance,

Ralf

Does your .ASPX page have a corresponding .ASPX.CS file associated with it? That's the default, but if you changed it, then that could be causing this problem, perhaps. Mind trying it on a new page that has a code-behind file to check?


Right - if you don't have a code behind file, that message is by design. Unfortunately there wasn't a good way to determine if the codebehind file is present without actually trying to show it.


My page has a codebehind file but ist is not aspx.cs, it is aspx.vb cause i am using VB at the moment. Could that be the cause? I have never tried it with a C# file.


No, it doesn't have to be c#.

Only requirement is that the code is in a separated code file(.cs or .vb).


That is strange. On the comuter at home i have the same effect. Maybe i will try to re-install the toolkit. Or do you have another idea what could cause that?


An additional info: That message is generated at two positions in the extenders source with the same message. I have modified those messages to see where the error is generated: It is generated when the variable "fileCodeModel" should be assigned. In my case this variable is "null" so the message is shown.

Wednesday, March 21, 2012

Events during Drag and Drop operations

I am looking for more information about the events supported by the drag and drop library in the latest release of ATLAS. For example, I would like to define a drop target and respond to an element being dropped on it. Is there a QuickStart that covers these events?

Try one of the dedicated Atlas forums, perhaps?

Errors hosting using AJAX ASP.NET

Hello,

I am a hosting website with a host who claims to have the latest version of the AJAX ASP.NET.. On my machine everything works fine while on the hosters it doesn't giving me an error like this

Configuration Error:


Parser Error Message:Couldnot load file or assembly 'System.Web.Extensions, Version=1.0.61025.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of itsdependencies. The system cannot find the file specified.

Line 38: </httpHandlers>
Line 39: <httpModules>
Line 40: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 41: </httpModules>
Line 42: </system.web>
 
Please anyone knows why I'm getting that error?
Thanks! 

Means the hoster does not have the 'System.Web.Extensions.dll install in the gac, you can put it on the bin directory and make sure the hoster is running in medium or full trust. Check this post for more details:http://alpascual.com/blog/al/archive/2006/12/20/Browse-all-AJAX-controls-at-ajax.alpascual.com.aspx

Hello AlbertPascual and thanks!

I will try that... but what if the Hoster is saying that the latest version is installed?... could be it wasn't installed correctly? I know this framework by default gets installed in the GAC, so there shouldn't be any problem with that!

THanks!


You can always override what they have by adding the dlls in your bin directory, if running at full trust, you'll be using your dlls instead of the hoster dlls.

Hope this helps


I belive still loading the old dll from your hoster and cannot find that method, check the public key PublicKeyToken=31bf3856ad364e35' to see if that's your dll public key

Thanks again!

in fact thanks to you it did help as moved on to another error now :)


Parser Error Message:Couldnot load type 'System.Web.UI.Compatibility.RequiredFieldValidator' fromassembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35'.

Line 1: <%@. master language="C#" autoeventwireup="true" inherits="Main, App_Web_main.master.cdcab7d2" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
What could this error be ? 


How can I check the public key?

how can I make sure they are pointing to my bin directory? there are no <trust> tags in my web.config and not even in the default installation of the AJAX fframework

Thanks!


hello.

i think that you haven't updated your web.config to the last version. it seems like you're strill trying to get the compatibilty validadors from the ajax dll and in the current version they're in an extra download which you can get from one of the top posts of the ajax library forum

hmmmmm yes your right... I solved it now working

however I'm concerned about the hosters how they said they have the latest version of AJAX 1.0 and then I had to use the Bin... I wish to eliminate the Bin folder so as to use the GAC which should be faster!!!

Thanks anyway!


Actually - the only faster there is is the first time the app spins up... placing something in the Gac does not make it faster overall it just means that it is spun up before the first person has requested a method etc from what is contained withing... this is a major misconception... GACcing something only means it is already resident but once something that is not gacced versus something is is spun up - they are equal in perf...just FYI