sta*_*ker 112 comments razor asp.net-mvc-3
在razor视图中服务器端注释的语法是什么?
我想评论这段代码:
/*
@helper NavItem() {
}
*/
Run Code Online (Sandbox Code Playgroud)
Jar*_*ttV 198
@* here is the code to comment *@
Run Code Online (Sandbox Code Playgroud)
Bui*_*ted 43
以下两项工作
@{
/*
This is a comment
*/}
@//This is another comment
Run Code Online (Sandbox Code Playgroud)
随着MVC 3的新Beta版的出现,旧的突出显示方法将无效.
@{
//This is a comment
}
@{/*
This is a multi
line comment
*/}
@*
This is a comment, as well
*@
Run Code Online (Sandbox Code Playgroud)
是更新的方法@//This is a comment,@/* */将不再有效.
小智 7
在.cshtml文件中,只需按cntrl + k和cntrl + c,您将看到注释由visual studio自动添加.(或者,cntrl_k和cntrl + u用于取消注释.)或者如果你想手动编写那么,只是傻瓜
@* Your Code *@
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
62362 次 |
| 最近记录: |