The difference between <%: and <% =

Possible duplicate:
ASP.NET custom tags

Hope these are not too many questions for beginners. It seems that I always use the correct syntax, but I really don’t understand why I use <%: and <% = in ASP.NET, and I was hoping someone could clarify for me. I found this article that explains <% = and <% # , but could not find anything on Google at <% :.

Examples of where I used a different 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 (for ChrisF): ASP.NET special tags

+3
source share
2 answers
<%: "some string" %>

equally:

<%= Html.Encode("some string") %>
+4

<%: - HTML-. Haacked. .NET 4.0.

+3

Source: https://habr.com/ru/post/1763166/


All Articles