Shouldn't that be <% %>
or <%= %>
for a shorthand of Response.Write?
Here's an MSDN article on Embedded Code Blocks.
ongle
2010-04-29 03:38:25
Shouldn't that be <% %>
or <%= %>
for a shorthand of Response.Write?
Here's an MSDN article on Embedded Code Blocks.
<%: %>
starts with .NET v4
For pre-v4 it's equivalent is <%= Html.Encode(...) %>
This sometimes happens to me when embedding code inside of html attributes. I've never quite pinned down the exact cause but sometimes you can get around it by using single quotes rather than double.
The problem was that I was using <%= %> (or even <%: %>) within a tag that had runat="sever".