Hi gang,
I know this is a dumb question but I haven't found an article online that describes how to do this --- suppose I have a Web Application Project (no App_Code folder!) with a default NameSpace of "TestApp". I have some classes that I want to be able to use from anywhere in my project. Let's say I add a new class file to the project, call it "test.cs". As I understand it:
- I can code as many classes in this physical file and they all would be automatically accessible from the code-behind code in my web pages.
- The names of my Classes have nothing to do with the name of physical file in which they reside (i.e. I don't have to have a Class called "Test". I could have three classes in the "test.cs" file called "Class1", Class2", and "Class3".
If the above is true, what happens if I want to put this class file ("test.cs") in a subfolder called "Classes?" It appears that the contents are no longer visible to the other project files. What is the right way to put common classes in a subfolder off the main project root folder and then be able to reference those classes from the code in the rest of my project?
As a related question, if I end up creating a bigger project where I want to group my forms into main categories (e.g. Products, Inventory, Sales, etc.) how do I do this so that these forms are visible to the rest of the project?
Thanks in advance,
Kevin