特殊标签asp.net之间的性差异 [英] Diference between special tags asp.net
问题描述
我开发一个应用程序的前端部分,现在,一个问题来到我的脑海里。
I'm developing a front-end part of an application right now, and a question came to my mind.
什么是asp.net特殊标记的区别:
What is the difference between asp.net special tags:
<%= %>
<%@ %>
<%# %>
和是否存在另一种特殊的标签,请描述其功能。
And if exists another special tag please describe its function.
推荐答案
-
&LT;%=
显示中的前pression的原始值
。 这种语法能引起XSS漏洞而不应被使用。
<%=
prints the raw value of the expression within.
This syntax can cause XSS vulnerabilities and should not be used.&LT;%:
打印和HTML-逃脱的前pression中的值<%:
prints and HTML-escapes the value of the expression within.&LT;%#
就像&LT;%=
,但是可用于数据绑定<%#
is like<%=
, but is used for data-binding&LT;%
执行的code,而忽略块和返回值<%
executes a block of code and ignores and return values&LT;%@
用于像页
或进口指令
。这篇关于特殊标签asp.net之间的性差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!