Quick question. I am trying to concatenate a string and a database value in a form (aspx file). I know how to do this on code behind file in C++ or VB
.NET, however, is not working in ASP.NET.
I have the following code of line that assigns the PictureURL database field to the ImageURL property of this image control:
<asp:Image ID="ImageUrl" runat="server" ImageUrl='<%# Eval("PictureURL") %>' />
However, the value of ImageUrl I want is a concatenation of the string "~/Pictures/" and the PictureURL database value.
I thought that the following modified line of code would work but I does not:
<asp:Image ID="ImageUrl" runat="server" ImageUrl='<%string.concat("~/Pictures/",Eval("PictureURL"))%>' />
Can you please advice me on the right way to do this?
I really appreciate your time and support on this.