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)
但它不起作用,我现在无法找到我读到的资源.
我用
# /*
Comment
Goes
Here
# */
Run Code Online (Sandbox Code Playgroud)
(编辑)更好的是,只需使用 ASPX 样式标签:
<title> Hello World <% /* comment
goes here */ %> </title>
Run Code Online (Sandbox Code Playgroud)
当然,如果您不介意在源代码中看到注释文本,那么 HTML 注释也始终有效。
| 归档时间: |
|
| 查看次数: |
941 次 |
| 最近记录: |