in ASP.NET (embedded code blocks)

Here (or here – in case it moves again) is a post I found and stashed away some time ago listing all the different inline server-side tags with examples. There are seven:

  1. <%...%> runs normal code
  2. <%=...%> is equivalent to Response.Write()
  3. <%#...%> is used for databinding expressions
  4. <%$...%> returns the value of an expression, and can be used in parameters (note: expressions are not code – see here)
  5. <%@...%> is for page directives, usually at the top of the ASPX file
  6. <%--...--%> is for comments
  7. <%:...%> is the same as <%= except it HTML-encodes the value

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)