zoukankan      html  css  js  c++  java
  • 遍历文件夹里面的文件,并绑定到dropdownlist

    string rep_path = Server.MapPath("reports");
            string[] files = Directory.GetFiles(rep_path);
            string[] report_files = new string[files.Length];
            for (int i = 0; i < files.Length; i++)
            {
               
                report_files[i] = files[i].Replace(rep_path + "//", "");
            }
            DropDownList1.DataSource = report_files;

            DropDownList1.DataBind();

  • 相关阅读:
    jsp第六周作业
    jsp第三周作业
    JSP第二次作业
    软件测试课堂练习(3.4)
    10.21
    10.7
    9.30
    9.23
    第四次作业
    第七周作业
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090606.html
Copyright © 2011-2022 走看看