有没有一种方法注释掉的标记在.aspx页面? [英] Is there a way to comment out markup in an .ASPX page?
本文介绍了有没有一种方法注释掉的标记在.aspx页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法注释掉在 .ASPX
页标记,使其不传递到客户端?我曾尝试标准注释<! - - >
但这恰恰被交付为注释并没有prevent从渲染控制。任何建议将有助于
解决方案
<% -
注释掉HTML / code /标记。任何与
此块将不被解析/由ASP.NET处理。 < ASP:日历=服务器>< / ASP:日历> <%#的eval(SomeProperty)%>
- %GT;
<一个href=\"http://weblogs.asp.net/scottgu/archive/2006/07/09/Tip_2F00_Trick_3A00_-Using-Server-Side-Comments-with-ASP.NET-2.0-.aspx\">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. 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屋!
查看全文