Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule Error -  error BC30456: 'TextBox1_OnTextChanged' is not a member of ...Module Error - error BC30456: 'TextBox1_OnTextChanged' is not a member of ...
Previous
 
Next
New Post
8/4/2014 10:27 AM
 

ok so ive decided to start back at step 1 with a simple text module. and here is what i have:

ascx:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Main.ascx.vb" Inherits="TestModule2.Main" %><h2>DNN TEST MODULE 2</h2>

ascx.vb:
Namespace TestModule2
    Partial Class Main
        Inherits PortalModuleBase
       Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        End Sub

    End Class

 

End Namespace

 

I checked the namespace in properties and it is "TestModule2"

Now i put the module into the dnn page and get this error:

Error: testmodule2 is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: 'TestModule2.Main' is not allowed here because it does not extend class 'System.Web.UI.UserControl'. ---> System.Web.HttpParseException: 'TestModule2.Main' is not allowed here because it does not extend class 'System.Web.UI.UserControl'. ---> System.Web.HttpParseException: 'TestModule2.Main' is not allowed here because it does not extend class 'System.Web.UI.UserControl'. ---> System.Web.HttpException: 'TestModule2.Main' is not allowed here because it does not extend class 'System.Web.UI.UserControl'. at System.Web.UI.TemplateParser.ProcessError(String message) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(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, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.WebFormsModuleControlFactory.CreateModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleControlFactory.LoadModuleControl(TemplateControl containerControl, ModuleInfo moduleConfiguration) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() -


 
New Post
8/4/2014 4:07 PM
 

just found the answer:

Inherits PortalModuleBase

has to be added to the class in the designer.vb file as well. This will fix the error

 
New Post
8/4/2014 4:21 PM
 

Glad you got it worked out.

Normally, Visual Studio should update your designer files for you so that you don't need to manually change them. But, for various reasons, that doesn't always happen. 

In any case, now that you have that basic setup/template squared away, the rest is really just normal .NET stuff for building out the functionality.

Mike

 
New Post
8/5/2014 2:27 PM
 

well i thought i had it. I copied some code from a working asp.net web app and the functions dont seem to be found. 

i have a function like so in ascx.vb

        Public Function ProcessPictures() As String
                Return "http://info/scripts/personnel/IDVerify/BadgePictures/transparent.jpg"
       End Function


I call it like so from ascx:

<img src='<%# ProcessPictures()%>'  />

 

tells me that "ProcessPictures is not declared. It may be inaccessible due to its protection level." 

Any reason why it wont find the function? Ive also tried calling it by <img src='<%# StaffLookup.Main.ProcessPictures()%>'  /> and it says "ProcessPictures is not a member of StaffLookup.Main". Am I missing another piece in order to link them up again?

 

 
New Post
8/5/2014 2:50 PM
 
I think you need to show us your code. We cannot guess what is on your screen.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule Error -  error BC30456: 'TextBox1_OnTextChanged' is not a member of ...Module Error - error BC30456: 'TextBox1_OnTextChanged' is not a member of ...


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out