开发者

Composition of data and text in alternatetext tag in Image control

开发者 https://www.devze.com 2023-03-25 13:16 出处:网络
I want to have a alternatetext tag in Image control . I want to combine text and data in alternatetext tag .

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

精彩评论

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