使用ASP.NET MVC的默认视图引擎,你可以宣布一个服务器端的评论是这样的:如何使用Razor视图引擎声明评论?
<%-- This is a comment --%>
此注释只会在服务器端可见,而不是发送到客户端。我将如何对Razor视图引擎进行相同操作?
使用ASP.NET MVC的默认视图引擎,你可以宣布一个服务器端的评论是这样的:如何使用Razor视图引擎声明评论?
<%-- This is a comment --%>
此注释只会在服务器端可见,而不是发送到客户端。我将如何对Razor视图引擎进行相同操作?
用@*
开始注释块,以*@
结束注释块。
到C#(/*
和*/
)类似
@* single line comment *@
或
@*
this is a comment
this is another
*@
更多关于the Gu's blog剃刀意见。
谢谢,这就是我正在寻找。奇怪的是,我的搜索没有出现在Scott Gu的博客上。 – 2010-12-17 03:57:34
有了这个,我们不能在块注释中做单行注释。 – SMUsamaShah 2016-02-01 18:59:15
[Razor评论语法]的可能重复(http://stackoverflow.com/questions/3382903/razor-comment-syntax) - 当您问这个问题时,在相关问题框中这是正确的 – jfar 2010-12-17 03:59:56
[Razor评论语法](http://stackoverflow.com/questions/3382903/razor-comment-syntax) – 2017-01-24 14:46:43