Results 1 to 5 of 5

Thread: Pictures showed of the data list

  1. #1
    Join Date
    Oct 2008
    Posts
    35

    Pictures showed of the data list

    I'm using Visual Studio 2005 and would like to see some pictures of my Data List, but has no idea how. Should they be taken from the database? Searched google, but without success.

    So if there is anyone who can help, I will be grateful.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Pictures showed of the data list

    Image name should probably just be saved in a new field in the database (such as img).

    In your list's data itemTemplate you just write the path to the image that must be
    Code:
    <img src="images/<;%#container.dataItem("img") %>" alt="" title="" />
    The same principle that you have already done the rest of your data - I assume ...

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Pictures showed of the data list

    I would use the ItemTemplate to build the structure you show in your example. In the ItemTemplate insert as an Asp:Image.
    In your code behind Hook you up ItemDatabound event and appreciate src your image to the desired path to the image.

  4. #4
    Join Date
    Oct 2008
    Posts
    35

    Re: Pictures showed of the data list

    Quote Originally Posted by Zecho View Post
    Image name should probably just be saved in a new field in the database (such as img).

    In your list's data itemTemplate you just write the path to the image that must be
    Code:
    <img src="images/<;%#container.dataItem("img") %>" alt="" title="" />
    The same principle that you have already done the rest of your data - I assume ...
    Ok, let me just try it, thank you for your help in advance

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Pictures showed of the data list

    You do not need to use the ItemDataBound event to this, use the code mentioned by Zecho or replace container.dataitem ( "img") with eval ( "img")

Similar Threads

  1. Replies: 2
    Last Post: 23-02-2012, 11:54 AM
  2. How to paste data in filtered list of Microsoft Excel
    By SeanZ in forum MS Office Support
    Replies: 2
    Last Post: 24-01-2012, 01:00 PM
  3. How to use table column as data validation list
    By connoisseur in forum MS Office Support
    Replies: 2
    Last Post: 13-01-2012, 06:10 PM
  4. 3G data card price list in India
    By Marcya in forum India BroadBand
    Replies: 1
    Last Post: 21-04-2011, 04:40 PM
  5. How to write a List Data Listener in Java?
    By MarceloQuad in forum Software Development
    Replies: 5
    Last Post: 13-02-2010, 02:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,309,678.25383 seconds with 16 queries