<asp:Image ID="Image2" runat="server" 
         ImageUrl='~\\Images\\thumbnail\\<%# Eval("brand")%>\\<%# Eval("thumbnail")%>' />

I tried several times with different types and didn't succeed.I want to bind two data from sqlserver database and put them in Image URL continuously.
Which the brand is something like "Dell" and thumbnail is "123.jpg"

What is the correct form ?

Please help me If you can, this is so crucial for me.

If you mean whether the code is in something like dataList, the answer is yes.
And also in Item Templates.

That's right but you suppose you have two parameter e.g T1 and T2.
Then can I use it like this ? :

<%# Eval("T1","T2","~\\Images\\{0}\\{1}")%>

my friend single / will do your job correctly...

ImageUrl='~\Images\thumbnail\<%# Eval("brand")%>\<%# Eval("thumbnail")%>'

Enjoy...mark the post resolved if it helps..

I think I would try

<asp:Image ID="Image2" runat="server" 
         ImageUrl='~\\Images\\thumbnail\\<%# Eval("brand") + "\\" + Eval("thumbnail")%>' />

, or something in that nature...

No that's not working,but I found the working code :

<%# String.Format("~\\Images\\thumbnail\\{0}\\{1}", Eval("brand"), Eval("thumbnail")) %>

Anyway thank you all for help.

This question has already been answered. Start a new discussion instead.