Recently I’ve started on my “Professional ASP.NET 4 in C# (and VB)” book to get my knowledge of ASP.NET up.
One of the things I’ve noticed was that nowhere in the first chapter(s) they explained the difference between all the ASP.NET inline tags (such as <% … %>, <%$ … %>, etc)
Therefor I’ve decided to put together this small overview of all the different inline tags and what they do. (Yes, it’s for my convenience too).
This post will cover the following inline tags:
- <% … %>
- <%= … %>
- <%# … %>
- <%& … %>
I think it’s obvious what the <%@ … %> tags do 😉
The <%– … –> tags serve as server-side comments. Meaning those comments will not be visible in the HTML source code.