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...Getting StartedGetting StartedBuilding my First Module: "View" page not seeing Code-behind fileBuilding my First Module: "View" page not seeing Code-behind file
Previous
 
Next
New Post
4/23/2013 1:42 PM
 
Hello,
I'm trying to build my first module, and getting an error from DNN that I shouldn't be getting, as far as I can tell. I'm using 7.00.05, by the way.

I've got the code written for my "View" page and its requisite code-behind file. My module consists of a form containing a drop-down menu called "Product1", and it has an event listener that fires when the menu selection changes. When I ran this code as an application in Visual Studio it worked fine, but DNN gives me an error:

'ASP.desktopmodules_electricheatregform_electricheatregform_view_ascx' does not contain a definition for 'Product1_SelectedIndexChanged' and no extension method 'Product1_SelectedIndexChanged' accepting a first argument of type 'ASP.desktopmodules_electricheatregform_electricheatregform_view_ascx' could be found (are you missing a using directive or an assembly reference?) --->

There's a lot more to it, but that's the gist.

I've made sure my "Inherits" reference at the top of the file is correct, my code-behind file is correct. My code behind file starts this way (after the assorted 'using' statements):

namespace ElectricHeatRegForm
{
    public abstract partial class ElectricHeatRegForm_View : DotNetNuke.Entities.Modules.PortalModuleBase
    {
       ...

As such, my "Inherits" reference on the View page is 'Inherits="ElectricHeatRegForm.ElectricHeatRegForm_View"'

I can't figure out why DNN isn't seeing my code behind; can anyone help me?

This is my first module, as I said, so I'm not sure what all I need to be sharing here. If anyone needs more information, I'll try to get it to you.
 
New Post
4/24/2013 7:32 AM
 

Hi Robert,

A bit hard to tell you what might be wrong just based on that. I would love to have a look at the whole project you have created. Zip it up and email me: aderson at dnnhero dot com.

I will post my comments back here.

Aderson


Aderson Oliveira
Your DNN Wingman
DeskPal.com
 
New Post
4/24/2013 7:40 AM
 
Are you using christoc's DNN module template?

http://christoctemplate.codeplex.com/

If not, go get it. This template does a lot of the work for you and I suspect you missed something that this template does for you. I've created modules with and without it and it's 100x's easier with it.

Give it a shot and let us know how it goes.

Mark
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedBuilding my First Module: "View" page not seeing Code-behind fileBuilding my First Module: "View" page not seeing Code-behind file


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