I have a project with this folder hierarchy:
Project
App_Code
library.cs
Application
page.aspx
page.aspx.cs
The problem is that page.aspx.cs cannot reference a public function in library.cs. I've checked all relevant access modifiers and even tried recreating the App_Code folder and its contents.
I also tried putting library.cs under the same folder as page.aspx.cs, but it still couldn't see into the App_Code namespace.
Basically, the App_Code namespace is reserved by the compiler for certain types of projects.
In this case, it was a web forms project. When I changed the namespace from App_Code to anything else, the reference worked just fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.