here is the code list all file in a folder-config it ur own,i list only .aspx files
--------------------------------------------------------------------
string dirPath = Server.MapPath( "");
int dirPathLength = dirPath.Length;
dirPathLength =dirPathLength+ 1;
string[] files = System.IO.Direc tory.GetFiles(d irPath, "*.aspx");
int fileArrLen = files.Length;
int i = 0;
Array Temp = Array.CreateIns tance(typeof(st ring), fileArrLen);
foreach (string x in files)
{
string newX=x.Remove(0 , dirPathLength);
Temp.SetValue(n ewX, i);
i++;
}
lstAllFiles.Dat aSource = Temp;
lstAllFiles.Dat aBind();
With Regards
www.renjur.co.n r
RENJUR
RENJUCOOL
--------------------------------------------------------------------
string dirPath = Server.MapPath( "");
int dirPathLength = dirPath.Length;
dirPathLength =dirPathLength+ 1;
string[] files = System.IO.Direc tory.GetFiles(d irPath, "*.aspx");
int fileArrLen = files.Length;
int i = 0;
Array Temp = Array.CreateIns tance(typeof(st ring), fileArrLen);
foreach (string x in files)
{
string newX=x.Remove(0 , dirPathLength);
Temp.SetValue(n ewX, i);
i++;
}
lstAllFiles.Dat aSource = Temp;
lstAllFiles.Dat aBind();
With Regards
www.renjur.co.n r
RENJUR
RENJUCOOL
Comment