473,394 Members | 1,699 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,394 software developers and data experts.

APP_Code Folder

Frinavale
9,735 Expert Mod 8TB
I created a custom class that inherits from the CheckBoxList.
I placed the the code for this in the App_Code folder because it's used through out my web application.

I ran into a namespace problem when I right clicked and added the new class to the App_Code folder...so I recreated the class in the root of my application.

Everything compiled properly, ran like a dream.

I figured, to keep organized, I'd move the class into the App_Code folder now that it was working. Once I did that it, the class no longer worked because it couldn't find an object type that's defined in a DLL that I'm using in the class........even though I import the namespace into the code.

Could someone please explain to me why placing classes into the App_Code folder breaks namespaces?

I've since moved all of my code into a new folder named "classes" and everything's working like a dream...I just don't understand what is with that folder.

-Frinny
Dec 17 '08 #1
1 2331
Plater
7,872 Expert 4TB
Are you sure there is supposed to be a namespace?
You guys knew more about this then me last time, but nothing in my app_code HAS a namespace.

And I know that when you add an item to a folder, it prepends the folder's name to the class name or something.

Like when I create an aspx page in the Manager folder, instead of being:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagerClientSiteTracking.aspx.cs" 
  2. Inherits="ManagerClientSiteTracking" %>
it's
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagerClientSiteTracking.aspx.cs" 
  2. Inherits="Manager_ManagerClientSiteTracking" %>
Perhaps there is something strange like that happening?
Dec 17 '08 #2

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

Similar topics

11
by: Steve Franks | last post by:
I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed in my /App_Code directory. Everything runs fine locally. However when I use the "Copy Web" function to upload the site...
5
by: Jay Douglas | last post by:
I have a set of pages that inherit from a base class in the App_Code folder. The class looks something like: public class MyBaseClass : System.Web.UI.Page In various stages of the life cycle I...
8
by: Umut Tezduyar | last post by:
I know that, in asp.net 2.0, the assembly for the web site is splitted into pieces and each time you build it, it generates a random name for assembly. My question is, if i create a custom web...
4
by: Filip De Backer | last post by:
Hi everyone, I've created 5 (different) asp.net 2.0 applications. Each applicationfolder contains an App_Code folder. Is it possible to set the App_code folder in de root of the website?...
2
by: walter | last post by:
Hi, when I add a new page in my asp.net 2 project and put some controls there, everything works fine until I move the code behind into App_Code folder.--When I compile , it tells me that control...
3
by: Howard | last post by:
I have two websites that basically use the same data access layer. the code in the app_code folder are identical for these two website. Each has a different presentation layer (html stuff). It's a...
2
by: pradeep_TP | last post by:
Hello, I am trying to use APP_CODE folder for all my class files under VS 2005. After adding APP_CODE in the solution explorer, I added a new web page by right clicking project and selecting add...
1
by: matt.merchant | last post by:
All, When publishing a site with the "Used Fixed Naming and Single Page Assemblies" option checked, only one of my two App_Code folders are compiled into .DLL's. The original code (DotNetNuke...
0
by: Rotsey | last post by:
Hi, I have a web site being developed with VS2005. I am upgrading a VS2003 application by copying each page one at a time and fixing problems. Also I have copied across my class object code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.