What is the syntax to concatenate text into a binding expression for an asp.net webpage (aspx).
For example if I had a hyperlink that was being bound like this:
<asp:HyperLink id='lnkID' NavigateUrl='<%# Bind('Link') %>' Target='_blank' Text='View' runat='server'/>
How do you change, say, the Text to concatenate a bound value with a string? Variations like this aren’t quite right.
Text='<%# Bind('ID') + ' View' %>'
neither does
Text='<%# String.Concat(Bind('ID'), ' View') %>'
Related Questions
No related questions found
You can also place the ‘concatenation’ in the text portion of a tag if using a template field:
This results in output like:
Name (ID)
inside of the template column.