Where to save web application classes

I need to create a small asp.net application. The last web application I built was a long time ago. At this time, I saved my classes in the App_Code folder.

While setting up the web solution in VS2010, I saw that VS no longer offers to create the App_Code directory (right-click on the project, add an asp.net folder). Is the App_Code folder the preferred place to save web application classes and where is the new place to store them?

Update

Thanks to Oded, I received an answer to my question.

If you have the same question as me, maybe he also does not know (like me) that there are two different types of projects with their own menu items in VS: Web application and Web site . The organization of these two types is different. For the web application, the App_Code folder is not offered in the asp.net menu folder. Perhaps this information helps someone.

+4
source share
1 answer

This is the preferred location, but VS 2010 just doesn't automatically create it for you.

As you can see from the app_code documentation for .NET 4.0, this is still the best place for general code.

In a website project, you can store the source code in the App_Code folder and it will be automatically compiled at runtime. The resulting assembly is available for any other code in the web application.

+3
source

Source: https://habr.com/ru/post/1333298/


All Articles