473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

using class file

Hi,

I am using Visual WebDeveloper 2005 Express Edition and am having trouble using a C# class file

I am using

<% @Import Namespace="CEmail" %>

and the class file is name CEmail.cs and is saved in the App_Code folder of my project.

The file builds ok locally and all is working, but as soon as I upload the project to another server, i get the message:



Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'CEmail' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 12: <% @Import namespace="System.Web.UI.HtmlControls" %>
Line 13:
Line 14: <% @Import Namespace="CEmail" %>


Can someone please tell me what I am doing wrong.

Thanks in advance!



Natalie.
Sep 28 '07 #1
2 1215
Shashi Sadasivan
1,435 Expert 1GB
Have you tried putting the complete namespace in there?

So go to the CEmail class and check which namespace it belongs to until you can trace it back to your projects name

So it should look something like YourProjectName.SomeotherNamespace.CEmail

cheers
Sep 28 '07 #2
dip_developer
648 Expert 512MB
Hi,

I am using Visual WebDeveloper 2005 Express Edition and am having trouble using a C# class file

I am using

<% @Import Namespace="CEmail" %>

and the class file is name CEmail.cs and is saved in the App_Code folder of my project.

The file builds ok locally and all is working, but as soon as I upload the project to another server, i get the message:



Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'CEmail' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 12: <% @Import namespace="System.Web.UI.HtmlControls" %>
Line 13:
Line 14: <% @Import Namespace="CEmail" %>


Can someone please tell me what I am doing wrong.

Thanks in advance!

Natalie.
Are your CEmail.cs class residing in another project???......I think so.....becuse if this is the case then I suspect you need the appropriate assembly reference....otherwise if CEmail.cs resides in the same project from where you are calling it then you can easily import it......
Sep 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
16
by: Giggle Girl | last post by:
Hi there, I have a nav tree similar to the XP Windows Explorer in behavior. It uses styles to underline a row on mouseover, and change the look of a row when clicked. Currently, it is working...
4
by: Dave Calkins | last post by:
I have a native Win32 C++ app built with Visual Studio 2005. I'd like to make use of a property grid control in this app. For an example of this, in Visual Studio, see the properties control...
4
by: rn5a | last post by:
Using VBC, I compiled a VB class file into a DLL named MyPro.dll. The namespace used in this class file is 'MyPro' & the public class is named 'MyClass'. This is the ASPX page which imports the...
2
by: rn5a | last post by:
Using the FileSystemInfo class, I am retrieving all the directories & files existing in a particular directory on the server & listing them in a ListBox. If an item in the ListBox happens to be a...
14
by: aaragon | last post by:
Hi everyone, I've been writing some code and so far I have all the code written in the .h files in order to avoid the linker errors. I'm using templates. I wanted to move the implementations to...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
1
by: WeCi2i | last post by:
Okay, I have a problem that has been stumping me for weeks. I have tried many different solutions and this is pretty much my last resort. I have seen a lot of good answers give here so I figured I...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.