简体   繁体   English

使用CodeBehind而不是DLL

[英]Use CodeBehind instead of DLL

I want to add new pages to a website without being have to recompile the whole site and copy the new dll to the bin folder. 我想将新页面添加到网站,而不必重新编译整个网站并将新的dll复制到bin文件夹。

I just want to upload the aspx files + the cs files. 我只想上传aspx文件+ cs文件。

Right now, when I try to do it the page won't load. 现在,当我尝试执行此操作时,该页面将无法加载。

If you are working with a Web Application Project, you have to compile and copy the dll and aspx files. 如果您正在使用Web应用程序项目,则必须编译并复制dll和aspx文件。

In your case you could also use a Web Site project. 在您的情况下,您也可以使用网站项目。 ASP.NET will compile your code while it's being accessed so you can only deploy new aspx and cs files. ASP.NET将在访问代码时对其进行编译,因此您只能部署新的aspx和cs文件。

Here you can find an overview of the differences between Web Application Project and Web Site Project and also a few hints on when to choose which. 在这里,您可以找到有关Web应用程序项目和Web站点项目之间差异的概述,以及有关何时选择哪个的一些提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM