你如何使用Razor视图引擎声明评论?

Dan*_* T. 36 c# asp.net-mvc viewengine razor asp.net-mvc-3

使用ASP.NET MVC的默认视图引擎,您可以声明服务器端注释,如下所示:

<%-- This is a comment --%>
Run Code Online (Sandbox Code Playgroud)

此注释仅在服务器端可见,不会发送到客户端.我如何使用Razor视图引擎做同样的事情?

RPM*_*984 71

启动注释块@*,结束注释块*@.

类似于C#(/**/)

@* single line comment *@
Run Code Online (Sandbox Code Playgroud)

要么

@*
    this is a comment
    this is another
*@
Run Code Online (Sandbox Code Playgroud)

更多关于Razor对Gu的博客的评论.