Advertisement
| 02.18.2008 at 09:05PM PST, ID: 23173470 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: |
protected void AJAXUploader1_FileUploaded1(object sender, EventArgs e)
{
EO.Web.AJAXPostedFile[] files = AJAXUploader1.PostedFiles;
string s = string.Empty;
foreach (EO.Web.AJAXPostedFile file in files)
{
s += System.IO.Path.GetFileName(file.TempFileName);
s += "<br />";
}
lblFiles.Text = s;
//string path1 = @"D:\Inetpub\docs\Upload\" + s.Trim();
//string path2 = @"D:\Inetpub\docs\UploadDestination\" + s.Trim();
string path1 = @"D:\Inetpub\docs\Upload\" + s;
string path2 = @"D:\Inetpub\docs\UploadDestination\" + s;
if (!File.Exists(path1))
{
using (FileStream fs = File.Create(path1)) { }
}
if (File.Exists(path2))
File.Delete(path2);
File.Move(path1, path2);
}
|
Advertisement