Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET MVC - No App_Code directory?

Status
Not open for further replies.

fletchsod

Programmer
Dec 16, 2002
181
I'm learning ASP.NET MVC and I noticed there's no App_Code directory. So, where do I put the C# class files instead?

Documentation or something to point me to the right direction?

Thanks...
 
make a directory and add the code. a common practice is
[tt]
root
/Controllers
/HomeController.cs
/AboutUsController.cs
/Views
/Home
/Index.aspx
/AboutUs
/Index.aspx
/Model
classes for the model.
[/tt]

My preference is to keep as much code in the core assembly and keep the Web project to css, js and views. the controllers, model and helper functions all go into a separate project.

App_Code has a role with website projects (opposed to web application projects) you could deploy your source files to this directory and change code on the fly without worrying about users accessing the directory directly.

This was probably the webforms attempt to make a static language "dynamic". at least to some degree.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top