【发布时间】:2011-01-25 16:53:25
【问题描述】:
我希望在我的.aspx 页面中显示此内容,而不使用特殊字符 XML 标记,这可以实现吗?
<asp:ServerTag Property1="a"
Property2="b"
Property3="c" <%-- Comment why this particular property is necessary --%>
Property4="d" />
但是,我收到了错误消息Server tags cannot contain <% ... %> constructs.。如果我使用 HTML 标签,我被告知服务器标签的格式不正确。
有没有其他语法可以做到这一点?
【问题讨论】: