In my c# code, I have a constant:
SITE_NAME = "my site";
I have a repeater control, and inside the itemtemplate I have a input control:
<input开发者_如何学JAVA type=image runat=server title="<%= SITE_NAME %>" />
Do I need special syntax to set this value? It isn't rendering the string "my site", rather it is rending:
<%= SITE_NAME %>
i.e. it isn't parsing it as c# code.
When working within a databound template, use <%# %> instead of <%= %>
精彩评论