Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a Asp.net 2.0 site and have stuck on a wallpapers section.I want to display thumbnails of wallpapers in 3X3 Grid I have used DataList,Reapeter,GridView but every thumbnails(Record) is in either vertical direction or in Horizontal after retrieval from database. Please solve this problem and message me. I will be really thankful to this forum and members..........
Posted

1 solution

Hi,

I'm providing some code for showing images like thumbnails.try once

ASP.NET
<asp:datalist id="DataList1" runat="server" repeatcolumns="4" repeatdirection="Horizontal" xmlns:asp="#unknown">
<HeaderTemplate >

</HeaderTemplate>
<itemtemplate>
   <table width="50" align="center">
   <tr>
    <td><img src="<%#Eval("imgpath") %>" width="50" height="50" /></td>
   </tr>
  </table>
</itemtemplate>
<footertemplate>

</footertemplate>
</asp:datalist>

Here you'll see 4 columns and rows depends on your count of images

you can adjust the size of image by setting width and height properties
All the Best
 
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