Possible Duplicate:
Are <%: and <%= the same thing as embbed code (expression) blocks
I am developing an ASP.NET MVC 2 application using .NET 4.0. Just wanted to know, what is the difference between
<%: item["Title"] %>
and
<%= item["Title"] %>
?
The first will automatically HTML Encode the value. The second won't.
<%: item["Title"] %>
is equivalent to
<%= Html.Encode(item["Title"]) %>
If 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