2009-07-30 68 views
0

我開發了一個用戶控件,我想在Umbraco中嵌入。這個過程似乎很簡單,但我可能正在嘗試一些無法完成的事情。用戶控件在Umbraco中的問題

我的用戶控件依賴於其他幾個用戶控件。當我嘗試在「main」usercontrol中瀏覽屬性時,我得到下面的錯誤。

我已將所有.ascx文件複製到usercontrols文件夾,並且程序集位於bin目錄中。是否有可能在Umbraco中託管一個依賴幷包含其他用戶控件的「複合」用戶控件?

System.Web.HttpParseException:文件'/ucLogin.ascx'不存在。 ---> System.Web.HttpParseException:文件'/ucLogin.ascx'不存在。 ---> System.Web.HttpException:文件'/ucLogin.ascx'不存在。 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)在System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile)(HttpContext上下文,虛擬路徑virtualPath,布爾noBuild,布爾allowCrossApp,布爾allowBuildInPrecompile)在System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,VirtualPath virtualPath,布爾noBuild,布爾allowCrossApp,布爾allowBuildInPrecompile)在System.Web.UI.BaseTemplateParser.GetReferencedType(虛擬路徑virtualPath,布爾allowNoCompile)在System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath)在System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry)在System.Web.UI.BaseTemplateParser.ProcessDirective(String指令名,IDictionary指令)在Sy在System.Web.UI.TemplateParser.ParseStringInternal(String text,Encoding fileEncoding)處的stem.Web.UI.TemplateControlParser.ProcessDirective(String directiveName,IDictionary指令)---在System.Web處結束內部異常堆棧跟蹤---。 System.Web.UI.TemplateParser.ParseString(String text,VirtualPath virtualPath,Encoding fileEncoding)處System.Web.UI.TemplateParser.ParseStringInternal(String text,Encoding fileEncoding)處的UI.TemplateParser.ProcessException(Exception ex)--- End內部異常堆棧跟蹤---在System.Web.UI.TemplateParser.ParseReader(StreamReader reader,VirtualPath virtualPath)上的System.Web.UI.TemplateParser.ParseString(String text,VirtualPath virtualPath,Encoding fileEncoding)。在System.Web.UI.TemplateParser.ParseInternal()System.Web.UI.TemplateParser.Parse()上System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath虛擬路徑)在Sys在System.Web.Compilation.BuildProvidersCompiler.PerformBuild()在System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()在System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)at tem.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context,System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile)在System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext上下文,VirtualPath virtualPath,布爾noBuild,布爾allowCrossApp,布爾allowBuildInPrecompile)在System.Web.UI.TemplateControl.LoadControl(VirtualPath虛擬路徑,布爾noBuild,布爾allowCrossApp,布爾allowBuildInPrecompile)虛擬路徑)在System.Web .UI.TemplateControl.LoadControl(字符串virtualPath)在umbraco.developer.assemblyBrowser.Page_Load(對象發件人,EventArgs的)經由ROOTPATH

回答

2

用戶控件參照其他控件。您可以將參考/ucLogin.ascx更改爲ucLogin.ascx,看看會發生什麼。

希望它可以幫助你,

理查德

+0

這是它...我有〜/寄存器指令......感謝參考了這麼多,現在感覺很無聊的! – 2009-07-30 11:32:26