Difference between special tags asp.net

前端 未结 3 1860
自闭症患者
自闭症患者 2021-01-15 12:47

I\'m developing a front-end part of an application right now, and a question came to my mind.

What is the difference between asp.net special tags:

&l         


        
3条回答
  •  离开以前
    2021-01-15 13:28

    • <%= prints the raw value of the expression within.
      This syntax can cause XSS vulnerabilities and should not be used.

    • <%: 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

    • <%@ is used for directives like Page or Imports.

提交回复
热议问题