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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Frustrating Namespace Issues! CS0246Frustrating Namespace Issues! CS0246
Previous
 
Next
New Post
4/9/2008 6:19 AM
 

Hey guys

I am still trying to code my own custom module for a DNN website. I find DNN very fussy at times, and the smallest error seems to break the entire website (always finding myself recreating the whole site, and doing things from scratch

The problem I am having seems to be with namespaces.

I understand that Module code is split into 2 folders

\App_Code for all the data information

\DesktopModules for all the GUI information

I use the namespace

namespace YourCompany.Modules.MyLoginModule for all the elements in my module (including data layer, BLL and GUI layer)

Where I am struggling is web user controls in \DesktopModules dont seem to "see each other", even using this same namespace.

I use it like:

namespace

YourCompany.Modules.MyLoginpublic partial class MyPassword : UserModuleBase

{

coupled with

<%

@ Control Language="C#" AutoEventWireup="true" CodeFile="MyPassword.ascx.cs" Inherits="YourCompany.Modules.MyLogin.MyPassword" %>

 

I current have a LoginView.ascx.cs and trying to access MyPassword.ascs. Visual studio doesnt seem to have a problem with it, yet when I run DNN it gives me the error:

 

Error: MyLogin is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: c:\inetpub\wwwroot\DNN09April\DesktopModules\MyLogin\LoginView.ascx.cs(40): error CS0246: The type or namespace name 'MyPassword' could not be found (are you missing a using directive or an assembly reference?) ---> System.Web.HttpCompileException:

I have googled this and it only points to namespaces and scope decleration being the problem.

 

Can anyone help me out PLZZZ?

{

 

 
New Post
4/9/2008 11:24 AM
 

If you changed the namespace value in your .ascx and .cs files, it is possible that it did not get changed in the designer.cs file.  That file contains the actual definition of the class for your user control, and if its namespace is different you will have issues.  Typically it automatically fixes itself but I have noticed at times that it will not due to some issue in Visual Studio.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
4/9/2008 2:14 PM
 

mmm, where do i find this designer.cs file? Im looking for it in the same module directories, but cant seem to find it anywhere

 
New Post
4/9/2008 3:32 PM
 

Visual studio sometimes tries to hide it for you....you can look in windows explorer and find it. 


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
4/10/2008 3:34 AM
 

I honestly cannot find that file, and its the first time Ive heard of it.

 

I have view hidden files on and also searched the directory with the windows search function and it doesnt pick up ANY .cs files except for the ones I created with my Module.

 

Maybe its different with the latest DotNetNuke?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Frustrating Namespace Issues! CS0246Frustrating Namespace Issues! CS0246


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