Author: zedric03 | Posted on: 9/10/2009 2:17:37 AM | Views : 288

 I already have a running code which creates a folder in C: and saved the uploaded files on it. It displays the last name and a first name of a person who uploaded it. What I want is to display a date when he uploaded the file together with the last name and first name. I used the running code below:
void SaveFile1(HttpPostedFile file)
{
string savePath1 = "c:\\Upload\\" + txtboxLName.Text + txtboxFName.Text + "\\";
string fileName1 = FileUpload1.FileName;
stringpathToCheck1 = savePath1 + fileName1;
string tempfileName1 = "";
if (File.Exists(pathToCheck1))
{
int counter1 = 2;
while (File.Exists(pathToCheck1))
{
tempfileName1 = fileName1 + counter1.ToString();
pathToCheck = savePath1 + tempfileName1;
counter++;
}
fileName1 = tempfileName1;
}
savePath1 += fileName1;
FileUpload1.SaveAs(s ...

Go to the complete details ...