服务器端注释:相当于<%-- --%>在 ASP 经典? [英] Server-side comments: What's the equivalent of <%-- --%> in ASP Classic?

查看:15
本文介绍了服务器端注释:相当于<%-- --%>在 ASP 经典?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

中的 <%-- --%> 的等价物是什么ASP 经典?

What's the equivalent of <%-- --%> in ASP Classic?

我必须修改旧的 ASP 应用程序,我想注释掉一段 HTML:

I have to modify a legacy ASP application and I'd like to comment out a block of HTML:

<td>
    some table cell I'd like to comment out, including
    some <%= inlineServerSideVBScriptExpressions() %>
</td>

<%-- ... --%> 中包装所有内容,就像我在 ASP.NET 中所做的那样,不起作用并导致编译错误预期语句".HTML 注释 <!-- ... --> 也不是一个选项,因为内联 ASP 表达式会被求值并失败.

Wrapping everything in <%-- ... --%>, as I'd do in ASP.NET, doesn't work and results in the compilation error "Expected statement". HTML comments <!-- ... --> are not an option either, since the inline ASP expressions would get evaluated and fail.

推荐答案

在 ASP Classic 中没有内置"方式来执行块注释.您必须在不想运行的每一行之前放置一个 '.

There's no "built-in" way to do block comments in ASP Classic. You have to put a ' before each line you don't want to run.

这篇关于服务器端注释:相当于&lt;%-- --%&gt;在 ASP 经典?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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