Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 30-01-2009
Member
 
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.
Reply With Quote
  #2  
Old 30-01-2009
Member
 
Join Date: May 2008
Posts: 2,293
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 ...
Reply With Quote
  #3  
Old 30-01-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
  #4  
Old 30-01-2009
Member
 
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
Reply With Quote
  #5  
Old 30-01-2009
Member
 
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")
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Pictures showed of the data list"
Thread Thread Starter Forum Replies Last Post
Is there a feature like Always show in Data Validation Drop Down List CeLeStiA MS Office Support 2 23-02-2012 11:54 AM
How to paste data in filtered list of Microsoft Excel SeanZ MS Office Support 2 24-01-2012 01:00 PM
How to use table column as data validation list connoisseur MS Office Support 2 13-01-2012 06:10 PM
3G data card price list in India Marcya India BroadBand 1 21-04-2011 04:40 PM
How to write a List Data Listener in Java? MarceloQuad Software Development 5 13-02-2010 02:30 AM


All times are GMT +5.5. The time now is 04:22 PM.