我正在创建应用程序。在那个,我把组合框,组合框填入申请号。来自db。在组合框的选择上,网格填充了驱动器中另一台机器中的文件。与//user/public/af001/edit/test.JPEG一样,在网格中,我将下载链接放在特定行上,以便在我的计算机上下载该文件,但问题是当我下载该文件时,我没有考虑//user/public/af001/edit/test.JPEG。
if (e.Column Index == 0)
{
int row;
//Get the row index
row = e.Row Index;
string old Path = @"~\\Users\Public\AS\AFS1402190001\Edit\test.JPEG";
string new path = @"E:\example\";
string new File Name = "new file name";
File Info f1 = new File Info(old Path);
if (f1.Exists)
{
if (!Directory.Exists(new path))
{
Directory.Create Directory(new path);
}
f1.Copy To(string.Format("{0}{1}{2}", new path, new File Name, f1.Extension));
}
}
你能告诉我这是什么问题吗?
感谢您的帮助。