开发者

Composition of data and text in alternatetext tag in Image control

I want to have a alternatetext tag in Image control . I want to combine text and data in alternatetext tag .

ho开发者_StackOverflow社区w can I do this ?

AlternateText='Sample + <%# Eval("fSubject") %>'

this is not working .


Please check this answer on SO.

How do you concatenate text when using Bind expression in asp.net

Check at the bottom of the following article. At the very bottom, it using example with AlternateText field being concatenated.

http://www.sedh.gr/tutorials/web_dev/ASPNET2/ASPNET07/aspnet07-05.html

<asp:Image Width="40" Runat="Server"
        AlternateText='<%# "Picture of " & Eval("ItemNumber") %>'
        ImageUrl='<%# "../Pictures/" & Eval("ItemNumber") & ".jpg" %>'/>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜