Search code examples
asp.netmarkupcomments

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.


Solution

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