Type or namespace UserControls not found in RelayWeb

I get the error "The type or namespace name 'UserControls' does not exist in the namespace 'RelayWeb' (are you missing an assembly reference?)" This is an imported existing web project and I have tried adding references to RelayWeb (developed in-house). This ia a ASP.NET with C# 2008 DotNet 3.5 project that was converted from a ASP.NET with C# 2003 DotNet 1.1.

Please refer to screen shot attached.
RelayWeb-And-UserControls.JPG
LVL 3
Mister_SpockAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Can you show the line that generates the error?

As a side note, folders in a .NET project, while most often times do, do not have to represent a namespace. Just because a folder with the same name as a namespace exists does not mean the namespace exists. You'll have to look at the namespace declarations of the affected files to see if the namespaces have been changed.
0
 
Mister_SpockAuthor Commented:
The path is http://localhost/RelayV4/RelayWeb/Stub_Aliases_aspx_cs.cs if that helps. It was a project I converted from DotNet 1.1 to DotNet 3.5.
UserControls.JPG
0
 
käµfm³d 👽Commented:
What do the namespace declarations look like in the files you are trying to access within UserControls? Do they have something like:
namespace RelayWeb.UserControls
{
...

Open in new window

0
 
Mister_SpockConnect With a Mentor Author Commented:
Here is what I found:

Stub_Aliases_aspx_cs.cs is located in:        RelayV4\RelayWeb\App_Code\Migrated\Campaign\Stub_Aliases_aspx_cs.cs

It has the Microsoft generated comments as follows:

// This file was generated as part of an ASP.NET 2.0 Web project conversion.
// This code file 'App_Code\Migrated\Campaign\Stub_Aliases_aspx_cs.cs' was created and contains an abstract class
// used as a base class for the class 'Migrated_Aliases' in file 'Campaign\Aliases.aspx.cs'.
// This allows the the base class to be referenced by all code files in your project.

The abstract class mentioned in the comments is:

abstract public class Aliases :  RelayBasePage
{


}



}

The inheritied abstract class (RelayBaseClass) is found in:

RelayV4\RelayWeb\App_Code\Config.cs and the class it inherits is System.Web.UI.Page

public class RelayBasePage : System.Web.UI.Page

The namespace in the RelayV4\RelayWeb\App_Code\Config.cs file creates is RelayWeb.

RelayV4\RelayWeb\CAMPAIGN/Aliases.aspx.cs mentioned in the above comments has the using statement “RelayWeb.UserControls” and that is found just fine. The namespace is RelayWeb.Campaign.

I hope this makes sense.
0
 
Mister_SpockAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.