Commenting in .aspx

What is the correct way to comment inside an .aspx file?

The HTML syntax for a comment:

<!-- [COMMENT] -->

This doesn't work, I get the following: "ASP.NET runtime error:Only Content controls are allowed directly in a content page that contains Content controls."

I have also tried ', //, #, and --


Direct entry:

  • <%-- your comment --%>
  • Visual Studio:

  • comment & un-comment buttons on the toolbar
  • CTRL+KC (comment)
  • CTRL+KU (un-comment)
  • 链接地址: http://www.djcxy.com/p/85280.html

    上一篇: 关于评论你的代码有什么“硬性规则”?

    下一篇: 在.aspx中注释