using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
public partial class view4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string strheadlinesid = string.Empty;
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Convert.ToString(
Request.QueryString["folder"].ToString())))
{
strheadlinesid = Request.QueryString["folder"].ToString();
}
}
Response.Write("");
DirectoryInfo Dir = new DirectoryInfo(strheadlinesid);
FileInfo[] FileList = Dir.GetFiles("*.*", SearchOption.AllDirectories);
foreach (FileInfo FI in FileList)
{
Response.Write("");
Response.Write("[url= view3.aspx?file=] " +
FI.Name + "[/url]");
Response.Write("");
}
Response.Write("");
}
private object DirectoryInfo(string p)
{
throw new NotImplementedException();
}
}
< /code>
Я получаю путь каталога, сохраняя его в папке. Однако, когда я использую его для печати файлов из этого каталога, я получаю следующую ошибку: < /p>
Не могу найти часть пути
'c: \ users \ naresh \ documents \ visual \'. 2010 \ сайты \ c_manager \ account
[code]using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO;
public partial class view4 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
string strheadlinesid = string.Empty;
if (!IsPostBack) { if (!string.IsNullOrEmpty(Convert.ToString( Request.QueryString["folder"].ToString()))) { strheadlinesid = Request.QueryString["folder"].ToString(); } }
Response.Write("");
DirectoryInfo Dir = new DirectoryInfo(strheadlinesid);
private object DirectoryInfo(string p) { throw new NotImplementedException(); }
} < /code>
Я получаю путь каталога, сохраняя его в папке. Однако, когда я использую его для печати файлов из этого каталога, я получаю следующую ошибку: < /p>
Не могу найти часть пути 'c: \ users \ naresh \ documents \ visual \'. 2010 \ сайты \ c_manager \ account [/code]. Но часть учетной записи динамически меняется.