Is there a way to comment out markup in an .ASPX page?

MikeJ picture MikeJ · Sep 23, 2008 · Viewed 185.1k times · Source

Is there a way to comment out markup in an .ASPX page so that it isn't delivered to the client? I have tried the standard comments <!-- --> but this just gets delivered as a comment and doesn't prevent the control from rendering.

Answer

GEOCHET picture GEOCHET · Sep 23, 2008
<%--
            Commented out HTML/CODE/Markup.  Anything with
            this block will not be parsed/handled by ASP.NET.

            <asp:Calendar runat="server"></asp:Calendar> 

            <%# Eval(“SomeProperty”) %>     
--%>

Source