Since .NET 4, you can use the syntax <%:%> to encode HTML text.
In the repeater, I use the following syntax to display data
<%# DataBinder.Eval(Container.DataItem, "fieldlabel")%>
The only way I can code the output in the repeater is with "Server.HtmlDecode". Is it possible to use the new <%:%> in the repeater only in conjunction with data binding so that I can remove the ugly HtlmDecode syntax. Or is the extension method my only way to improve readability?
source
share