Skip to main content

Devexpress <% Tags


<% ... %>Code Block

  • Executes C# code but does not render any output to the page.

  • Useful for logic (e.g., declaring variables, loops).

<% int x = 5; %>

<%= ... %>Output (Escaped)

  • Evaluates the expression and writes the result to the page.

  • The output is HTML-encoded (i.e., special characters are escaped).

<%= "<b>Hello</b>" %> <!-- Outputs: &lt;b&gt;Hello&lt;/b&gt; -->

In DevExpress, it actually outputs Hello, in bold

3. <%- ... %>Output (Unescaped)

  • Writes the result to the page without HTML encoding.


Comments

Popular posts from this blog