C# code[AjaxPro.AjaxMethod]
public string displayRst(int flag)
{
……
while(flag==0)
{
foreach (FileInfo fi in dir.GetFiles())
{
if (fi.Name.Substring(fi.Name.LastIndexOf(".") + 1) != "zip")
{
flag = 1;
//显示文件内容
switch (method)
{
case 1: myResult = this.ReadIni(fi.FullName); break;
case 2: myResult = this.ReadSort(fi.FullName); break;
case 3: myResult = this.readWebSite(fi.FullName); break;
case 4: myResult = this.ReadFile(fi.FullName); break;
default: break;
}
break;
}
}
}
return myResult;
}