I know that <%: does the html.encode thing, but there are lots of situations when I’m sure that I don’t need to encode, so why should I waste time on encoding stuff that I’m 100% sure it doesn’t require to be encoded like for example <%:Url.Action("Index") %> or <%: Model.Id %> (is of type int)?
I know that <%: does the html.encode thing, but there are lots of situations
Share
Personally I use it only for stuff that I know that needs to be encoded. No need to use it for integer types
<%: Model.Id %>but that’s just a personal preference.