I have an arraylist that consists of files from a folder. I want to put the name of the files on the tabs of the tab control and the contents of the files (htm's) on the tab content page. Can you help me out? Here is what I have so far:
string[] arrFileNames;
int NumFiles;
protected void Page_Load(object sender, EventArgs e)
{
//LEH_Trend_043008_0016
string FPath = Server.MapPath("reports");
ArrayList Files = new ArrayList();
foreach (string mFile in Directory.GetFiles(FPath))
{
FileInfo mFileInfo = new FileInfo(mFile);
if (mFileInfo.Exists)
{
Files.Add(mFileInfo.Name);
}
}
Files.
foreach (object MyFile in Files)
{
TabContainer1.Tabs.Add(MyFile.ToString());
}
}
The Tab container is expecting a control child as the parameter, how do I make it happy?
Note: I am on Win2k so I cannot use AJAX 3.5, have to do without linq.