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
7/31/2014 2:53 PM
 

So ive created a module that uses a text changed event handler. In VS 2012 the code is without error. However when I try to use my module in DNN 7 i get the following error:

 

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: C:\inetpub\wwwroot\dotnetnuke\desktopmodules\testmodule\Main.ascx(72): error BC30456: 'TextBox1_OnTextChanged' is not a member of 'ASP.desktopmodules_testmodule_main_ascx'. ---> System.Web.HttpCompileException: C:\inetpub\wwwroot\dotnetnuke\desktopmodules\testmodule\Main.ascx(72): error BC30456: 'TextBox1_OnTextChanged' is not a member of 'ASP.desktopmodules_testmodule_main_ascx'. 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() --- End of inner exception stack trace ---

main.ascx has this:
Protected Sub TextBox1_OnTextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged

main.ascx.vb calls it like this:
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_OnTextChanged" AutoPostBack="true"></asp:TextBox>


Anyone have a clue why its not seeing it?

 
New Post
7/31/2014 3:39 PM
 

My default guess here would be that your namespaces aren't matching up... anything there?

Edit: Sorry, to try to give a better answer... Check the "Inherits" bit of your .ascx file. Then, check the room namespaces of the compiled DLL. My guess would be that the .ascx file can't fine the class or something.

Hope this helps,

Mike

 
New Post
7/31/2014 8:23 PM
 

well my ascx page has this: 
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Main.ascx.vb" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" %>

then the ascx.vb page has this:
Namespace adama.TestModule
    Public Class Main
        Inherits PortalModuleBase


Im not sure how to check the dll 

 
New Post
8/1/2014 4:38 AM
 

Hi

Code inside Inherits of ascx page need change. I think code should be look like below: 

ascx page:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Main.ascx.vb" Inherits="adama.TestModule.Main" %>

then the ascx.vb page has this:
Namespace adama.TestModule
    partial Class Main
        Inherits PortalModuleBase

Thanks
Sibabrata Dash
Mindfire Solutions

 
New Post
8/1/2014 6:00 PM
 
Yes - Sababrata is correct - your .ascx file can't find the procedure because it is looking in PortalModuleBase, not TestModule.Main.

If you're still having trouble, check your root namespaces in Visual Studio - do that by right-clicking on the project and choosing properties. I've seen people have trouble because Visual Studio is adding a namespace onto the one they've specified in their files. So, it might look like adama.adama.TestModule.Main... if that makes sense.

Hope this helps,

Mike
 
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