Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name for ASP/ASP.NET Short Tags

Is there a particular name for <% and %>.

like image 990
Nasir Avatar asked Jan 25 '26 01:01

Nasir


2 Answers

Scott Gu calls these Code Nuggets. So thats what I go with.

http://weblogs.asp.net/scottgu/archive/2010/04/06/new-lt-gt-syntax-for-html-encoding-output-in-asp-net-4-and-asp-net-mvc-2.aspx

like image 65
BentOnCoding Avatar answered Jan 26 '26 18:01

BentOnCoding


<% %> is usually referred to as a "server-side code block" or "code rendering blocks".

http://quickstarts.asp.net/QuickstartV20/aspnet/doc/pages/syntax.aspx

Which is different from <%# %>, which is a "databinding code block"

and <%$ %> is an 'expression code block'. (introduced in .NET 2.0)

like image 24
David Avatar answered Jan 26 '26 17:01

David