i have a string of this kind..
string myFile1= @"C:\Documents and Settings\Desktop\ExcelSheets\2004abc.xls";
i want to get the 2004abc.xls..how can this be acheived?
i have been able to split the string and get individual values ..but how do i get the last one..2004abc.xls from this..
string[] arInfo = new string[6];
// define which character is seperating fields
string splitter = "\\";
char csplitter = Convert.ToChar(splitter);
arInfo = myFile1.Split(csplitter);
for(int x = 0; x < arInfo.Length; x++)
{
Response.Write(arInfo[x] + "
");
}