Click here to Skip to main content
12,444,517 members (52,380 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads

Stats

111.3K views
7.3K downloads
48 bookmarked
Posted

Display image gallery in ASP.NET GridView Control

, 3 Nov 2008 CPOL
Here we can use GridView control to display images in a gallery view with internal paging.
imagegalleryingridview.doc
imagegalleryingridview.JPG
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="gallary.aspx.vb" Inherits="gallary" title="Untitled Page" %>
<asp:Content ID="Content4" ContentPlaceHolderID="middlesection" Runat="Server">

  <table border="0" cellpadding="0" cellspacing="0" width="100%">  
  <tr>
           <td align="left">
                         
                            <asp:GridView ID="gvListProperty" runat="server" AutoGenerateColumns="false" Width="100%"
                                border="0" AllowPaging="true" BorderColor="white" cssClass="griditem"   PageSize="10"  >
                                <PagerSettings Mode="Numeric"  Position="TopAndBottom"/>
                                <PagerStyle CssClass="mypager" HorizontalAlign="right" />
                                <Columns>                                    
                                    <asp:TemplateField>
                                         <HeaderStyle CssClass="dispnone" />	
                                        <ItemTemplate>
                                             <table width="100%">
                                                <tr>
                                                    <td class="bdr-grey">                                                    
                                                        <table width="100%" border="0" cellspacing="0" cellpadding="0" Class="griditem" >
                                                            <tr>
                                                              <td width="60px" height="60px" Class="griditem" >
                                                              <%#Container.DataItem("Column1")%>
                                                              </td>                                                              
                                                              <td width="60px" height="60px" Class="griditem" >
                                                              <%#Container.DataItem("Column2")%>
                                                              </td>                         
                                                              <td width="60px" height="60px" Class="griditem" >
                                                              <%#Container.DataItem("Column3")%>
                                                              </td>                         
                                                              <td width="60px" height="60px" Class="griditem" >
                                                              <%#Container.DataItem("Column4")%>
                                                              </td>                                                                                                                                        
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
           
</td>
    </tr>
   </table>             
</asp:Content>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

Share

About the Author

Vimal Panara
Technical Lead IndiaNIC Infotech Ltd
India India
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160811.3 | Last Updated 4 Nov 2008
Article Copyright 2008 by Vimal Panara
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid