Possible Duplicate:
ASP.NET “special” tags
I hope this isn't too much of a newbie question. I seem to always use the correct syntax, but I don't really understand why I'm using the <%: and <%= in ASP.NET, and I was hoping someone could clarify for me. I found this article which explains <%= and <%#, but wasn't able to find anything in Google on <%:.
Examples of where I have used the various syntax:
<div>
<%: Html.LabelFor(model => model.Type) %>
<%: Html.TextBoxFor(model => model.Type)%>
</div>
and
<div id="header-menu">
<ul>
<li><%= Html.ActionLink("Home", "", "Home" )%></li>
</ul>
</div>
Thanks for any clarification.
Possible Answer (per ChrisF): ASP.NET "special" tags
<%: "some string" %>
is equal to:
<%= Html.Encode("some string") %>
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