You misunderstood the tag <%:. The tag <%:only encodes a normal one string, not HtmlStringhow the header is returned Html.TextBox.
Example:
<%: Html.TextBox("TestText", "<Test>") %>
<%= Html.TextBox("TestText2", "<Test>") %>
Both operators return the same text value as indicated in the question. Now consider this statement.
<%: "<Test>" %>
, .
EDIT:
MVC, HttpUtility.HtmlAttributeEncode . , HTML.