Our Forum has Moved

This site is our old forum and is only here for achive until we get proper 301 redirects setup to make Google happy.

Please use our new community site - Our Umbraco - which contains an improved forum, documentation wiki, package repository and a member locator.

Go to Our Umbraco now

Learn everything about Umbraco
UpdatePanel causing error in control. Options
widescreen
Posted: Friday, April 25, 2008 3:46:12 AM

Rank: Newbie

Joined: 3/29/2008
Posts: 24
Location: NC
I have a small sample user control (called HelloJim.ascx in this case) that simply adds the contents of a text box to a dropdown list.

When I use the control without using an UpdatePanel (no AJAX), everything functions perfectly from within Umbraco.

However, when I wrap my controls in an UpdatePanel, I get the following error on the frontend:

Error creating control (/usercontrols/HelloJim.ascx).
Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!

And when browsing the macro and selecting "Browse properties" on the backend I get the following:

"Error reading /usercontrols/HelloJim.ascx"

I'll post the remainder of the error, in full, at the bottom.

I actually went so far as to uninstall and reinstall the asp.net 3.5 extensions, hoping that perhaps I had a version of the control stuck in my GAC that was to recent or a CTP or something, but have checked all my assemblies and they seem to be in order.

Here is the complete error from the backend:

BEGIN ERROR

[UNDEFINED VALUE TEXT]
Error reading /usercontrols/HelloJim.ascx

The following list shows the Public Properties from the Control. By checking the Properties and click the "Save Properties" button at the bottom, umbraco will create the corresponding Macro Elements.

System.Web.HttpParseException: The base class includes the field 'myUpdatePanel', but its type (System.Web.UI.UpdatePanel) is not compatible with the type of control (System.Web.UI.UpdatePanel). ---> System.Web.HttpParseException: The base class includes the field 'myUpdatePanel', but its type (System.Web.UI.UpdatePanel) is not compatible with the type of control (System.Web.UI.UpdatePanel). at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder) at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse) at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse) at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers() at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree() at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder) at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) --- End of inner exception stack trace --- at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)

END OF ERROR

Thanks so much for the help and please let me know if I have posted in the wrong area and I will repost to the Extensions area.

Best regards and thanks for such an awesome product...

Hal
drobar
Posted: Friday, April 25, 2008 4:02:30 AM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 2,020
Location: MA, USA; Cambridge, UK
Hi, Hal,

I'm not an expert in this area, but two things come to mind.

First, have you disabled the script manager in your ASPNET_FORM?

Second, have you followed the instructions in the error and clicked the Browse Properties button on your macro? The properties don't always get set to the proper types automatically. What are the properties and their types? That could be the problem. Tim made a great little screencast and mentions this at about the 4:30 into the video at http://www.nibble.be/?p=12

cheers,
doug.



MVP 2007-2009 - Percipient Studios - Percipient Blog
neehouse
Posted: Friday, April 25, 2008 7:13:58 AM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,150
Location: Charleston, West Virginia, United States
I have not seen your errors before, but wanted to expand upon Doug's comments. Not sure it will help, but try adding the ASPNET_HEAD tags in place of the head tags in your templates. -> <?ASPNET_HEAD>...</?ASPNET_HEAD>

As for reading the control properties, the control needs to be compiled. If you are copying from a website project, you may need to place the codebehind in the App_Code folder (you may have to create it). ASP.NET will precompile the source files in there. Since the properties are read using reflection, controls that use inline scripting tend to fail on that action. You can add the properties manually, and it will work correctly.

Also, there were changes in the latest version. It is possible a new bug was introduced into 3.0.5. Which version are you using.

Case



• 2007/2008 MVP • 2008/2009 MVP • Certified •
Best Case Technologies, LLC
• Umbraco Licensing • Support Packages • Web and Application Development • Hosting • Multi-Lingual Site •
tim
Posted: Friday, April 25, 2008 8:57:07 AM

Rank: Umbracoholic

Joined: 2/19/2007
Posts: 1,056
Location: Belgium
Hi Hal,

What umbraco version are you using ?

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
widescreen
Posted: Friday, April 25, 2008 12:30:53 PM

Rank: Newbie

Joined: 3/29/2008
Posts: 24
Location: NC
Thanks for such a quick response. I am running version 3.0.5 of Umbraco.

I have verified that I am only using the standard <?ASPNET_FORM></..> umbraco tags with no other options set and when I view the generated source I get the normal stuff like:

<script src="/ScriptResource.axd?d=GQ5SUsTVbFMgBtA8UOxROcknnQG6_vtTMXWcdSxobDz0pmx5RiBrRJuXWrQnYvSjOVWQ7pwdCP7XVKpjAHuC8JawndsBls7Q9HzEG_mr2SrCB2iY2rHYO0b6UclCWl-G0&amp;t=633362539734671062" type="text/javascript"></script><script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('umbracoScriptManager', document.getElementById('ctl05'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>

that I would expect from the script manager.

@neehouse I have also replaced my <head> tags with the <?ASPNET_HEAD></?..> and see them generating in the generated html, but it didn't seem to remedy the ajax issue...

@drobar I have also tried browsing the properties on the back end per the video, but that dialog is actually where the long error code, that I included in the original post, is generated.

Additionally, I am not using dynamically compiled code but am building directly to the bin directory for this web application.

I can't thank everyone enough for their replies... Any additional suggestions would be *greatly* appreciated. I will continue to try to fight with it and post again if I can figure it out.

Best regards,

Hal

sjors
Posted: Friday, April 25, 2008 1:14:57 PM

Rank: Fanatic

Joined: 7/20/2006
Posts: 410
Location: Amsterdam
Maybe test this in debug modus in Visual Studio? Its easier to set breakpoints and catch errors.
widescreen
Posted: Friday, April 25, 2008 3:51:28 PM

Rank: Newbie

Joined: 3/29/2008
Posts: 24
Location: NC
I think it has to do with the fact that my development project is targeting the 3.5 version of the extensions and therefor dependent on the 3.5 ScriptManager. Has anyone has any luck or sample web.config files getting umbraco to use the 3.5 extensions instead of the 2.0 version with AJAX Extensions?

I may be off base in this may be common practice, with only my configuration coughing... but I was just curious.

Best regards and thanks again.

Hal
widescreen
Posted: Friday, April 25, 2008 3:56:30 PM

Rank: Newbie

Joined: 3/29/2008
Posts: 24
Location: NC
UREKEA (SP?)!!! This fixed all my problems:

http://forum.umbraco.org/yaf_postst1245_A-version-compatible-with-Windows-Server-2008--ASPNET-35.aspx

Thanks A TON for everyone's help.

Hal
drobar
Posted: Friday, April 25, 2008 4:01:40 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 2,020
Location: MA, USA; Cambridge, UK
drobar
Posted: Friday, April 25, 2008 4:02:26 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 2,020
Location: MA, USA; Cambridge, UK
You found your answer while I was posting... congratulations!! And thanks for posting the solution.

cheers,
doug.

MVP 2007-2009 - Percipient Studios - Percipient Blog
theplastictoy
Posted: Saturday, December 06, 2008 2:27:15 PM
Rank: Enthusiast

Joined: 9/11/2008
Posts: 29
Location: Portugal
Actually, I only had this error with .NET 2.0 and ASP.NET Ajax 1.0.
With 3.5, everything runs smoothly.
anilreddy
Posted: Tuesday, May 05, 2009 5:06:40 AM
Rank: Newbie

Joined: 1/31/2009
Posts: 5
Location: New Zealand
Hi Widescreen, i facing the same errors, when i click on the Browse Properties under macro properties, i get an error saying "Error reading /usercontrols/SearchBox.ascx" can please help me out with this.

The forum has moved

This forum is no longer in use, so you can't reply to this message - please go to Our Umbraco

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.