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.
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.
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
The same principle that you have already done the rest of your data - I assume ...Code:<img src="images/<;%#container.dataItem("img") %>" alt="" title="" />
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.
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")
Bookmarks