Possible Duplicate:
ASP.NET “special” tags
You know how you can embed property value from code-behind in your page by simply using <%= PropertyFromCodeBehind %> in your .aspx?
Well, I only recently discovered that and I can't seem to find any tutorial that would explain this (and related stuff) in more depth (I only know that <%# is used in conjuction with Eval) - probably because I'm using <% for searches.
So, can anybody provide me with more detail explanation of these tags, or give a link to some tutorial that explains all this? I'm interested in anything that can be learned on this subject; somewhere I saw that you can do fancy stuff like <% for ... %>.
Here is a good place to get started.
There are several different syntaxes:
<%$ %>
Expression Syntax<%# %>
Data-Binding syntax<% %>
Evaluated Code Blocks<%= %>
Statement and ExpressionNew to ASP.NET 4 is the HTML encoding syntax (haacked). This is the same as <%= %>
except the result is HTML encoded (for non IHtmlString
types). The new syntax is intended to replace <%= %>
.
<%: %>
HTML Encoded outputIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With