如何在运行时编译aspx.cs页面 [英] how to compile a aspx.cs page at runtime

查看:158
本文介绍了如何在运行时编译aspx.cs页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在运行时编译aspx.cs页面?

how to compile a aspx.cs page at runtime?

推荐答案

根本不需要......



为了使Web应用程序能够为请求提供服务,ASP.NET必须首先将Web应用程序的代码解析并编译为一个或多个程序集。编译代码时,它将被翻译成与语言无关且与CPU无关的表示,称为Microsoft中间语言(MSIL)。在运行时,MSIL在.NET Framework的上下文中运行,它将MSIL转换为运行应用程序的计算机上处​​理器的CPU特定指令。



< big> ASP.NET动态编译使您可以修改源代码,而无需在部署Web应用程序之前显式编译代码。如果修改源文件,ASP.NET会自动重新编译该文件并更新所有链接的资源。除非< processmodel> ;,否则不必重新启动IIS服务器以使更改生效。部分已更改。
Not required at all......

In order for your Web application to service requests, ASP.NET must first parse and compile the code of your Web application into one or more assemblies. When the code is compiled, it is translated into a language-independent and CPU-independent representation called Microsoft Intermediate Language (MSIL). At run time, MSIL runs in the context of the .NET Framework, which translates MSIL into CPU-specific instructions for the processor on the computer running the application.

ASP.NET dynamic compilation enables you to modify your source code without having to explicitly compile your code before you deploy your Web application. If you modify a source file, ASP.NET automatically recompiles the file and updates all linked resources. The IIS server does not have to be restarted for the changes to take effect unless the <processmodel> section has been changed.


这篇关于如何在运行时编译aspx.cs页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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