Click here to Skip to main content
15,910,797 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have an html page where list of products are displayed along with their description, now I am converting this page to aspx page where the images are taken from the database...

I want it to be in the below mentioned format...
ASP.NET
<li>
  <div class="template-blog-header">
   <div>
    <h3 class="template-blog-header-header"><a href="#"><asp:Label runat="server" ID="label1"></asp:Label></a></h3>
   </div>
  </div>
 <div class="template-blog-image">
<div class="template-component-image template-component-image-preloader">
<asp:Image runat="server" ID="image1"/>
<div class="template-component-image-description"><asp:Label runat="server" ID="label3"></asp:Lable></div>
</div>
<div class="template-blog-excerpt">
<asp:Label runat="server" ID="label2"></asp:Label>
</div>
</div>
</li>


Here I want to display all these images and descriptions and details etc from the database to the label1, label2, image1 etc.

Regards

What I have tried:

Have tried putting these in a loop but shows only the last image and description
Posted
Updated 9-Jun-16 22:42pm
v2

1 solution

Look at using a Repeater Class (System.Web.UI.WebControls)[^] - the link shows an example.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900