MikeJ MikeJ - 3 months ago 10
ASP.NET (C#) Question

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

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. Any suggestions would help

Answer
<%--
            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