你如何申报使用的Razor视图引擎评论? [英] How do you declare a comment using the Razor view engine?
本文介绍了你如何申报使用的Razor视图引擎评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用ASP.NET MVC的默认视图引擎,你可以宣布这样的服务器端注释:
Using ASP.NET MVC's default view engine, you can declare a server-side comment like this:
<%-- This is a comment --%>
本评论只会在服务器端可见,而不是发送到客户端。我怎么会做同样的剃刀视图引擎?
This comment will only be visible on the server side and is not sent to the client. How would I do the same with the Razor view engine?
推荐答案
开始以注释块@ *
,结束与注释块* @
。
类似于C#( / *
和 * /
)
@* single line comment *@
或
@*
this is a comment
this is another
*@
更多关于剃须刀的评论上的the顾的博客。
这篇关于你如何申报使用的Razor视图引擎评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文