Image & Eval

Discussion in 'ASP .Net' started by Mario, Jun 9, 2010.

  1. Mario

    Mario Guest

    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?
     
    Mario, Jun 9, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Newton
    Replies:
    3
    Views:
    9,620
    Brock Allen
    Apr 4, 2005
  2. DataBinder.Eval and Eval.

    , Jun 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    583
    Karl Seguin [MVP]
    Jun 16, 2006
  3. Alex van der Spek

    eval('07') works, eval('08') fails, why?

    Alex van der Spek, Jan 8, 2009, in forum: Python
    Replies:
    6
    Views:
    1,561
    Bruno Desthuilliers
    Jan 8, 2009
  4. Liang Wang
    Replies:
    8
    Views:
    158
    Ben Morrow
    Feb 2, 2008
  5. Marc Girod

    to eval or not to eval?

    Marc Girod, Apr 19, 2011, in forum: Perl Misc
    Replies:
    2
    Views:
    177
    Marc Girod
    Apr 19, 2011
Loading...

Share This Page