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" %>'/>
精彩评论