Irwsoft NETCore Asp

Image Gallery
Brief Information
DescriptionA control to display a set of images.
Features
  • Allows user to see a set of images as gallery.
  • Data binding from database and/or markup.

Display A Set of Picture data with ImageGallery


ASPX code for ImageGallery

// 1) Defines the ImageGallery control
<ImageGallery ID="IG1" runat="server" SkinStyle="DarkBlue" Height="300" Width="1300">
     // 2) Defines image gallery item
     <ImageGalleryItem ImageUrl="~/Img/Hydrangeas.jpg" Description="<b>0-Hydrangeas</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Jellyfish.jpg" Description="<b>1-Jellyfish</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Lighthouse.jpg" Description="<b>2-Lighthouse</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Hydrangeas.jpg" Description="<b>3-Hydrangeas</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Jellyfish.jpg" Description="<b>4-Jellyfish</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Lighthouse.jpg" Description="<b>5-Lighthouse</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Hydrangeas.jpg" Description="<b>6-Hydrangeas</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Jellyfish.jpg" Description="<b>7-Jellyfish</b>" />
     <ImageGalleryItem ImageUrl="~/Img/Lighthouse.jpg" Description="<b>8-Lighthouse</b>" />
</ImageGallery>
ImageGallery control
ImageGallery control that displays a set of images.


Data binding from database using Person object.


ASPX code for Image

// 1) Defines the ImageGallery control
<ImageGallery ID="IG1" runat="server" SkinStyle="DarkBlue" Height="300" Width="1300">
     <ImageGalleryPropertyNames>  // 2) Defines PictureUrl property to bind inside ImageGalleryPropertyNames tag
          <ImageGalleryPropertyName Name ="PictureUrl" DataType="ImageUrl" Format="~/Img/{0}" />
     </ImageGalleryPropertyNames>
</ImageGallery>

C# code for Person table

// 1) Sample code for Person table
public class Person
{
     // 2) The columns of Person table.
     public int ID { get; set;}
     public string FirstName { get; set;}
     public string LastName { get; set;}
     public GenderType Gender { get; set;}
     public DateTime DateOfBirth { get; set;}
     public int Age { get; set;}
     public string Address { get; set;}
     public string City { get; set;}
     public string Country { get; set;}
     public string IdentityCardNo { get; set;}
     public string BioData { get; set;}
     public string PictureUrl { get; set;}  // 3) Input Gender property of Person.
}


Related Topics :


Irwsoft Data Ultimate Edition 4.0 supports data-schema extension (entity framework, linq to sql, simple class, and etc).