ASP.Net Tag Description

I came across this post response and thought it would be good to share (and keep for reference). This is quite a good description (with links to MSDN references) of the differences between the various tags used in ASP.NET development.

<% %> An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page class.

<%= %> most useful for displaying single pieces of information.

<%# %> Data Binding Expression Syntax.

<%$ %> ASP.NET Expression.

<%@ %> Directive Syntax.

<%-- --%> Server-Side Comments.

<%: %> Like <%= %> But HtmlEncodes the output (new with Asp.Net 4).

Til next time ...