IMO, you have to move the code from App_Code . In .net 4.5 (and 4.0), your code is compiled into a DLL, so I donβt see any benefits for entering code in App_Code . If someone advises different, I am interested to hear.
With this in mind, create a folder or folders under your root project and place your code there.
MyWebsite - DataLayer MyDataLayer.cs Default.aspx
In this example, you can access your DataLayer.MyDataLayer classes
Better yet, create a new library for code that is not needed in your aspx.cs code for the files.
source share