using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Collections.Generic;
public partial class _Default : System.Web.UI.Page
{
static int i = 0;
static int[] a= new int[6];
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
a[i] = i;
DataList1.DataSource = GetPhotos(i);
DataList1.DataBind();
i++;
}
}
// This Method Returns The value generics type list of strings
public List
{
List
String photopath = Server.MapPath("~/uploadimages");
string[] f1 = Directory.GetFiles(photopath);
photos.Add(f1[i1]);
return photos;
}
// This is the button event showing Next Image in this folder it contain 6 Images
// only .Other wise u can show msg when it 6
protected void Button1_Click(object sender, EventArgs e)
{
if (i >= 6)
{
i = 0;
}
DataList1.DataSource = GetPhotos(i);
DataList1.DataBind();
i++;
}
}
/================================================================