使用CodeBehind代替DLL

发布于 2024-12-22 22:41:20 字数 105 浏览 2 评论 0原文

我想向网站添加新页面,而不必重新编译整个网站并将新的 dll 复制到 bin 文件夹。

我只想上传aspx文件+cs文件。

现在,当我尝试这样做时,页面将无法加载。

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.

I just want to upload the aspx files + the cs files.

Right now, when I try to do it the page won't load.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

年少掌心 2024-12-29 22:41:20

如果您正在使用 Web 应用程序项目,则必须编译并复制 dll 和 aspx 文件。

在您的情况下,您还可以使用网站项目。 ASP.NET 将在访问代码时对其进行编译,因此您只能部署新的 aspx 和 cs 文件。

在这里您可以找到 Web 应用程序项目和 Web 之间差异的概述站点项目以及有关何时选择哪个的一些提示。

If you are working with a Web Application Project, you have to compile and copy the dll and aspx files.

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文