There are six types of the server side tags:-
- <% %> This is an inline server side code block which is executed during Render. Generally we call methods inside our page code behind file through this. For Details see this.
- <%= %> This is the replacement for Response.Write to a specific place. Most of the time we use it to display single pieces of information. For Details see this.
- <%# %> We use during the data binding. For Details see this.
- <%$ %> This is used for ASP.NET Expression. Generally I use it to extract resources from resource files. For Details see this.
- <%@ %> This is use for Directive Syntax. For Details see this.
- <%-- --%> Server-Side Comments generally we use this to comment server side controls. For Details see this.