codeFILE VS codeBehind [英] CodeFile vs CodeBehind
问题描述
是什么 codeFILE =file.ascx.cs和 codeBehind之间的差异在声明=file.ascx.cs一个ASP.NET用户控件的?
What is the difference between CodeFile="file.ascx.cs" and CodeBehind="file.ascx.cs" in the declaration of a ASP.NET user control?
是一个较新的或推荐?或者,他们有特定的使用?
Is one newer or recommended? Or do they have specific usage?
推荐答案
codeBehind :需要编译(ASP.NET 1.1模型)。编译的二进制放置在网站的bin文件夹。你需要做一个编译在Visual Studio部署之前。这是当你不想源$ C $ C是可视为纯文本一个很好的模式。例如提供给客户谁你没有义务提供code时。
CodeBehind: Needs to be compiled (ASP.NET 1.1 model). The compiled binary is placed in the bin folder of the website. You need to do a compile in Visual Studio before you deploy. It's a good model when you don't want the source code to be viewable as plain text. For example when delivering to a customer to whom you don't have an obligation to provide code.
codeFILE :您提供用于部署的解决方案的源文件。在需要的时候ASP.NET 2.0运行时编译code。编译后的文件是在Microsoft.NET [.NET版本] \\临时ASP.NET文件。
CodeFile: You provide the source file with the solution for deployment. ASP.NET 2.0 runtime compiles the code when needed. The compiled files are at Microsoft.NET[.NET version]\Temporary ASP.NET Files.
这篇关于codeFILE VS codeBehind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!