App_Code class access confusion



Steps to reproduce:
1. Create new web app. I am in v3.5 and vs2008
2. Create App_Code folder
3. Add Class A with public static int B;
4. Go to default.aspx.cs Page_Load and the compiler says that Class A does
not exist in the current context.

Why? And how do I access these classes in App_Code?

By default it creates the namespace for the class as
WebApplication1.App_Code, but htis doesn't seem to matter. I change the
namespace or remove it, nothing works.

I have another starter kit that has App_Code classes which are recognized
fine, but I don't know why.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question