<%="Hello World" %> renders the same thing as the C# code <% Response.Write("Hello World"); %> . Note: For languages that use marks to end or separate statements (for example, the semicolon (;) in C#), it is important to place those marks correctly depending on how your code should be rendered.
| C# code | |
|---|---|
<% Response.Write("Hello World"); %> |
A semicolon is necessary to end the statement. |
<%="Hello World"; %> |
Wrong: Would result in "". |
<%="Hello World" %> |
A semicolon is not necessary. |