I understand what these signify in the markup of the aspx pages ... but I don\'t not know the full power they can be used for or even the name to denote these special directives
The MSDN documentation calls them embedded code blocks. You can put pretty much any code you would place in code-behind files and the server will execute them before serving your pages to browsers.
Directive is the name given to one particular type of code block, the one most commonly seen at the top of ASP.NET pages to give the compiler information about your ASP.NET pages. They are delimited by <%@
and %>
.
The language of the code blocks is the same one as specified in the directive block. A quick example:
<%@ Page Language="C#" %>
<% string hello = "Hello world!"; Response.Write(hello); %>
<% for (int i = 1; i <= 5; ++i) { %>
- <% Response.Write("Item #" + i); %>
<% } %>