APP_code文件夹有什么用? [英] what is the use of APP_code folder?

查看:136
本文介绍了APP_code文件夹有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在ASP.NET应用程序中,可以添加一个特殊的APP_CODE文件夹.我为什么要这样做?我需要考虑什么,例如放入此处的特殊类型的文件?

:)
Thanks

Hi,

In an ASP.NET application, it''s possible to add a special APP_CODE folder. Why would I do this? Is there anything that I need to consider such as special types of files that go in here?

:)
thanks

推荐答案

在网站项目中,您可以将源代码存储在App_Code文件夹中,并且它将在运行时自动编译. Web应用程序中的任何其他代码都可以访问生成的程序集.因此,App_Code文件夹的工作方式与Bin文件夹非常相似,不同之处在于,您可以在其中存储源代码而不是已编译的代码. App_Code文件夹及其在ASP.NET Web应用程序中的特殊状态使您可以创建自定义类和其他仅源代码的文件,并在您的Web应用程序中使用它们,而不必独立编译它们.

App_Code文件夹可以包含写为传统类文件的源代码文件,即具有.vb扩展名,.cs扩展名的文件,等等.但是,它也可以包括未明确使用特定编程语言的文件.示例包括.wsdl(Web服务描述语言)文件和XML模式(.xsd)文件. ASP.NET可以将这些文件编译为程序集.

App_Code文件夹可以包含所需的任意数量的文件和子文件夹.您可以使用方便的任何方式来组织源代码,而ASP.NET仍将所有代码编译为一个程序集,Web应用程序中任何地方的其他代码都可以访问该程序集.
In a Web site project, you can store source code in the App_Code folder, and it will be automatically compiled at run time. The resulting assembly is accessible to any other code in the Web application. The App_Code folder therefore works much like the Bin folder, except that you can store source code in it instead of compiled code. The App_Code folder and its special status in an ASP.NET Web application makes it possible to create custom classes and other source-code-only files and use them in your Web application without having to compile them independently.

The App_Code folder can contain source code files written as traditional class files — that is, files with a .vb extension, .cs extension, and so on. However, it can also include files that are not explicitly in a specific programming language. Examples include .wsdl (Web service description language) files and XML schema (.xsd) files. ASP.NET can compile these files into assemblies.

The App_Code folder can contain as many files and subfolders as you need. You can organize your source code in any way that you find convenient, and ASP.NET will still compile all of the code into a single assembly that is accessible to other code anywhere in the Web application.


关于asp.net中App_Code文件夹的所有信息- Clickety [ ^ ]

修复了链接.
Here is all you need to know about App_Code folder in asp.net - Clickety[^]

Fixed the link.


看看这篇文章:初学者'的ASP.NET应用程序文件夹指南 [ ^ ]
Have a look at this article: Beginner''s Guide to ASP.NET Application Folder[^]


这篇关于APP_code文件夹有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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