Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to format the aspx like this with the help of repeater control

HTML
<div id="gallery">
				<ul>
                	<li>
                		<h5>Image title 1</h5>
	                	<a href="gallery/1.jpg" title="Des 2">
                		<img src="gallery/1.jpg" alt="Image 01" />
						</a>
					</li>
                	<li>
                        <h5>Image Title 2</h5>
                        <a href="gallery/2.jpg" title="Des 2">
                        <img src="gallery/2.jpg" alt="Image 02" />
                        </a>
			  		</li>
                   </ul>
    </div>


My repeater code is like this


ASP.NET
<div id="gallery">
              <asp:repeater id="repeater1" runat="server">
                  <itemtemplate>
                      <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageThumbPath") %>' 
                      Width="100px" Height="80px" alt='<%#Eval("ImageName") %>' style="cursor:pointer" />
                  </itemtemplate>                  
              </asp:repeater>
          </div>


My Database contain fields
ImageName
ImageThumbPath
ImageTitle
ImageDescription
Posted
Updated 30-Sep-14 19:47pm
v2

1 solution

Refer my article - ASP.NET Repeater with jQuery Slider[^].

You will find the code to format the way you need.
 
Share this answer
 
v2
Comments
jinesh sam 1-Oct-14 2:08am    
Thanks i will go trough the link and revert back if any problem arise
jinesh sam 1-Oct-14 3:30am    
its work fine. but one problem occurred in the design part. i am using master page and content page to display the data.
my content page named as gallery.aspx
and in that there is one div named as <div id="gallery">
when i populate the div with repeator the content flows out of the footer(designed in master page)
when i hard corded the div tag there is no problem
any idea ?!!
You have to check what CSS is responsible for this. Check in Developer Tool like FireBug.

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