开发者

From inside a repeaters itemtemplate, how to set a input type (image) controls title attribute?

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 <%= %>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜