Spark视图引擎中的HTML注释

ror*_*ryf 6 asp.net-mvc spark-view-engine

如何注释掉Spark视图的某些部分,以便它们不会呈现给客户端?

在aspx页面中我可以这样做:

<%-- server-side comment --%>
Run Code Online (Sandbox Code Playgroud)

我以为使用三个破折号会起作用:

<!--- server-side comment --->
Run Code Online (Sandbox Code Playgroud)

但它不起作用,我现在无法找到我读到的资源.

tyl*_*erl 4

我用

# /* 
   Comment
   Goes
   Here
# */
Run Code Online (Sandbox Code Playgroud)

编辑)更好的是,只需使用 ASPX 样式标签:

<title> Hello World <% /* comment 
        goes here */ %> </title>
Run Code Online (Sandbox Code Playgroud)

当然,如果您不介意在源代码中看到注释文本,那么 HTML 注释也始终有效。