Hey guys,
I want to develop a custom module for dotnetnuke in C#. Everything is super ok so far except for one problem:
In the ascx View control for my module, I use a Datalist for the layout. In the ascx file I need to call a function in the dll module like the DataBinder.Eval (Container.DataItem, "Val") function whichworks great. However, I need to call one of my functions like GetImageUrl(DataBinder.Eval (Container.DataItem, "Image")). The GetImageUrl is a public function in ModuleName.ascx.cs file.
When I insert <%#GetImageUrl(DataBinder.Eval (Container.DataItem, "Image")) %> in the ascx file a :
DotNetNuke.Services.Exceptions.ModuleLoadException: External component has thrown an exception. ---> System.Web.HttpException: External component has thrown an exception. ---> System.Web.HttpCompileException: External component has thrown an exception. at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String sourceString) at System.Web.Compilation.BaseCompiler.GetCompiledType() at System.Web.UI.UserControlParser.CompileIntoType() at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation().
exception is thrown at runtime. I saw lots of functions in the other modules that are called form the ascx file and of course there is no problem there.
I don't know what to do, is there a problem with C#?
Thank you!
Alex