DotHTML markup supports two types of comments.

Client-side comments

The client-side comments have the same syntax and rules as the HTML comment.

    <!-- The client-side comment is rendered to the HTML output. -->

DotVVM keeps these comments as they are, so they are rendered and sent to the browser.

They are not displayed to the user, but anyone can read them when looking at the page source or using the developer tools in the browser.

Server-side comments

To remove a fragment of code from the rendered output, use the server-side comments.

    <%-- This server-side comment is removed from the HTML output. --%>

You can also use server-side comments inside tags, like this:

<dot:GridView DataSource="{value: Source}" <%-- server comment in attributes --%> class="table">

If you want to comment parts of the markup with controls, it is better to use the server-side comment, so the commented code cannot be read by the user.

See also