【发布时间】:2010-11-20 16:26:17
【问题描述】:
我无法使用 google 找到任何东西...如果我在我的 ASP.NET 代码页上写:
<!-- #include file="file_to_include.aspx" -->
文件被输出到页面。如何禁用此行为?
#include 和 Server Side Include (SSI) 上的 MSDN 信息
【问题讨论】:
我无法使用 google 找到任何东西...如果我在我的 ASP.NET 代码页上写:
<!-- #include file="file_to_include.aspx" -->
文件被输出到页面。如何禁用此行为?
【问题讨论】:
更新的答案 现在有更多的牛铃!
事实证明,您可以在 IIS 的 Web 服务扩展管理器 中禁用服务器端包含:
只需选择Server Side Includes 并点击Prohibit 按钮。
答案 #2较新的答案:
IIS 中的disabling server side includes 怎么样?
旧答案
如果您使用Server Side comment,应该可以。
试试这个:
<%-- <!-- #include file="file_to_include.aspx" --> --%>
【讨论】: