Image & Eval

M

Mario

Could you please look the next code:

<asp:DataList ID="dlstImage" RepeatColumns="4"
runat="server">
<ItemTemplate>
<%--Ovo je za poèetno
iniciranje uèitanih slika, meni ne treba--%>
<asp:Image ID="Image1"
ImageUrl='<%#Eval("Name","~/UploadSlika/{0}") %>' Width="100px"
runat="server" BorderColor="#006600" />
<br />
</ItemTemplate>
</asp:DataList>

I works ok, it shows all images from "UploadSlika" folder. But I need images
from client folder, for example:
~UploadSlika/ClientFolder1/*.jpg
or
~UploadSlika/ClientFolder2/*.jpg

etc.

How dynamicaly change a folder?
In c# code I tried this:

logoi.ImageUrl = Path.Combine("~/UploadSlika/" +
name.Text + "/", "*.*");

But it don't works.

Second question is: what is the "Name" in Eval code? Is it property ? From
which class?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top