![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 139
Rep Power: 4
![]() |
Hello All,I cant figure it out:
I started a new asp.net web application in VS Pro 2005 (herein referenced as VS2005P) and added a folder named App_code (by right clicking on the project). It looks like VS2005P was ok with it as it changed the icon for the folder to a gray folder with a thing on it. I right clicked and added classes, but when I tried to instantiate those classes from my .aspx files it doesnt recognize them i get that error "type or namespace could not be found....." **note the code in app_code are my business objects not my code behinds. code behinds are with the .aspx files code for business class in app_code written by VS2005P: namespace PropertyPhotos
{
namespace PropertyPhotos.App_Code
{
public class Photos
{
....... code
}
}
}I tried getting rid of the ".app_code" from the namespace, but no work still: namespace PropertyPhotos
{
public class Photos
{
private string _errorMessage = "";
private string _thumbsDIR_base = Util.readFromWebConfig("thumbsDIR_base");
private string _fullSizeDIR_base = Util.readFromWebConfig("fullSizeDIR_base");
}
}Here is my .aspx code - this is where i get the error: namespace PropertyPhotos
{
public partial class propertyPhotos : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//string propertyID = Request.QueryString["pid"];
string propertyID = "1234";
Photos photos = new Photos(propertyID);
.... more code
}
}
}The error: Error 1 The type or namespace name 'Photos' could not be found (are you missing a using directive or an assembly reference?) E:\.....\Visual Studio 2005\Projects\C21k\PropertyPhotos\PropertyPhotos\PropertyPhotos\propertyPhotos.aspx.cs |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 139
Rep Power: 4
![]() |
Re: accessing classes in app_code folder
Fixed. It turns out that the properties for each of the files in my app_code folder had build action set to content and not compile. Thnx
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| code check whether a folder is empty | myName | C++ | 6 | Jun 22nd, 2006 8:58 AM |
| Could some please explain classes to me... | TCStyle | C++ | 10 | Feb 20th, 2006 3:51 PM |
| What is Lightweight C++? difference in inner classes between C++ and Java? | jonyzz | C++ | 4 | Sep 2nd, 2005 9:56 AM |
| List of classes | Dark_Shinobi | C++ | 8 | May 23rd, 2005 3:50 PM |
| Classes | Sane | Python | 8 | Apr 29th, 2005 12:50 PM |