Razor comment syntax

后端 未结 4 720
自闭症患者
自闭症患者 2020-12-02 10:09

What is the syntax for server side comment in razor view?

I want to comment this code:

/*
@helper NavItem() {

}
*/
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 11:09

    Inside the .cshtml file, just press cntrl+k and cntrl+c, You will see the comment is automatically added by visual studio.(alternatively, cntrl_k and cntrl+u for uncommenting.) Or else if you want to write it manually then, just gohead with

    @* Your Code *@
    

提交回复
热议问题