剃刀视图中服务器端注释的语法是什么?
我想评论这段代码:
/*
@helper NavItem() {
}
*/
@* here is the code to comment *@
Both of the following work
@{
/*
This is a comment
*/}
@//This is another comment
With the new Beta of MVC 3 out the old methods of highlighting won't work.
@{
//This is a comment
}
@{/*
This is a multi
line comment
*/}
@*
This is a comment, as well
*@
Is the updated method @//This is a comment
and @/* */
will no longer work.
在 .cshtml 文件中,只需按cntrl+k和cntrl+c,您会看到 Visual Studio 自动添加注释。(或者,cntrl_k和cntrl+u用于取消注释。)或者如果您想手动编写它, 只是继续
@* Your Code *@
如果它在您看来,您不能使用标准的 HTML<!-- ... //-->
或 .NET 样式<%-- .. --%>
吗?