如何组织ASP.NET APP_ code文件夹? [英] How to organize ASP.NET app_code folder?

查看:73
本文介绍了如何组织ASP.NET APP_ code文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ASP.NET我APP_ code文件夹中有大量的在它的.cs文件。这将是巨大的,如果我可以通过它们属于在我的项目,所以我不会永远滚动模块时,我扩大APP_ code文件夹整理。你如何组织你的吗?

In ASP.NET my app_code folder has a ton of .cs files in it. It would be great if I could organize them by the module they belong to in my project so I am not scrolling forever when I expand the app_code folder. How do you organize yours?

推荐答案

使用文件夹...

或全部类别搬出来一个类库为您的网站,并参考该库。

Or move all your classes out to a Class Library for your Web site and reference that library.

然后正常文件夹和放大器;命名空间所有的类都在​​那里。

Then properly folder & namespace all your classes there.

在过去,在这里我不得不用我镜像主站点的文件夹结构的任何具体的APP_ code文件夹,并有一个共同的文件夹,一切

In the past, where I've had to use the App_Code folder I've mirrored the folder structure of the main site for anything specific and had a common folder for everything else

例如

Site
|- App_Code
    |- Login
    |- Common
    |- Controls
    |- AdminArea
    |- SomethingElse
|- Login
|- Controls
|- AdminArea
|- SomethingElse
\- Default.aspx

这篇关于如何组织ASP.NET APP_ code文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆