特殊标签asp.net之间的区别 [英] Difference between special tags asp.net
本文介绍了特殊标签asp.net之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在正在开发应用程序的前端部分,然后想到一个问题。
I'm developing a front-end part of an application right now, and a question came to my mind.
asp.net special与有什么区别?标签:
What is the difference between asp.net special tags:
<%= %>
<%@ %>
<%# %>
如果存在另一个特殊标记,请描述其功能。
And if exists another special tag please describe its function.
推荐答案
-
<%=
打印其中的表达式的原始值
此语法可能会导致XSS漏洞,因此不应该使用。<%=
prints the raw value of the expression within.
This syntax can cause XSS vulnerabilities and should not be used.<%:
打印并HTML转义其中的表达式的值。<%:
prints and HTML-escapes the value of the expression within.<%#
类似于<%=
,但用于数据绑定<%#
is like<%=
, but is used for data-binding<%
执行一段代码,忽略并返回值<%
executes a block of code and ignores and return values<% @
用于诸如Page
或Imports
的指令。这篇关于特殊标签asp.net之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文