<%= %> I know that this means Response.Write but what is the meaning of ":" sign?
views:
38answers:
2Or to put it simply, it HTML encodes the result of the expression.
slugster
2010-06-27 14:01:02
A:
<%:%>
is like <%=Server.HtmlEncode()%>
, and was introduced in ASP.NET 4.0. In addition to outputting, it also HtmlEncodes the output, to avoid most simple cases of XSS.
The whole thing is a shortcut to:
<script language="vbscript" runat="server">
Response.Write(Server.HtmlEncode()))
</script>
Oded
2010-06-27 14:00:46