What happened to the App_Code folder in Visual Studio 2010?


P

Peter

In Visual Studio 2008 web sites, class files are placed in a special
folder called "App_Code". But when I create a new web site in Visual
Studio 2010, and select menu option Website | Add ASP.NET Folde,
App_Code is no longer an option.

Can you tell me why the App_Code folder has been removed from Visual
Studio 2010? And if I'm not supposed to place my class files into the
App_Code folder any more, then where am I supposed to place them?

Thank you.
 
Ad

Advertisements

M

Mr. Arnold

In Visual Studio 2008 web sites, class files are placed in a special
folder called "App_Code". But when I create a new web site in Visual
Studio 2010, and select menu option Website | Add ASP.NET Folde,
App_Code is no longer an option.

Can you tell me why the App_Code folder has been removed from Visual
Studio 2010? And if I'm not supposed to place my class files into the
App_Code folder any more, then where am I supposed to place them?

Thank you.

I never used the App_Code folder in any ASP.NET solution, starting with
VS2001. You either put a folder in the ASP.NET folder where the code
behind files are located, put the classes there and set reference to
folder namespace or you create a classlib project, put the classes there
and set project reference to the classlib project and using a namespace
to the classlib project.
 
Ad

Advertisements

M

Mr. Arnold

In Visual Studio 2008 web sites, class files are placed in a special
folder called "App_Code". But when I create a new web site in Visual
Studio 2010, and select menu option Website | Add ASP.NET Folde,
App_Code is no longer an option.

Can you tell me why the App_Code folder has been removed from Visual
Studio 2010? And if I'm not supposed to place my class files into the
App_Code folder any more, then where am I supposed to place them?

I'll make another suggestion to you. You should learn how to use the
Model View Presenter pattern.

MVP is a software pattern considered a derivative of the
Model-view-controller.

http://en.wikipedia.org/wiki/Model_View_Presenter
http://msdn.microsoft.com/en-us/magazine/cc188690.aspx
http://mrrask.files.wordpress.com/2008/01/model-view-presenter.pdf
http://www.mvcsharp.org/Reworking_ASPNET_MVC_Store/Default.aspx
http://www.codeproject.com/KB/aspne...lect=2822806#Reusing the presenter in windows
http://codebetter.com/blogs/jeremy....net-and-the-model-view-presenter-pattern.aspx

MODEL-VIEW-PRESENTER

http://www.polymorphicpodcast.com/

click 'Shows'

click 'Design Patterns Bootcamp: Model View * Patterns*

view parts 1-5
 

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

Top