是否有办法在.ASPX页面中注释掉标记? [英] Is there a way to comment out markup in an .ASPX page?

查看:192
本文介绍了是否有办法在.ASPX页面中注释掉标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 .ASPX 页面中注释掉标记,以便不会传递给客户端?我已经尝试标准的评论<! - - > 但是这只是作为一个注释,并不阻止控件渲染。任何建议都有助于

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

推荐答案

<%--
            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") %>     
--%>

来源

这篇关于是否有办法在.ASPX页面中注释掉标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆