J
Jameel
Hello,
uptill now i able to save the files to the server with thier original names, but i want to save the files with different names to avoid duplication of file names. see the following for what i have acheived uptill now :
strFileName = txtFileName.PostedFile.FileName
strFileName = System.IO.Path.GetFileName(strFileName)
'Save Uploaded file to server
strFileNamePath = strFileFolder & strFileName
If Not (txtFileName.PostedFile Is Nothing) Then
Try
txtFileName.PostedFile.SaveAs(strFileNamePath)
Catch ex As Exception
Response.Write("Error Saving File <Br> " & ex.Message.ToString)
Return False
End Try
Please help me ! I would really appreciate if you would write me some code, not only explain me !
uptill now i able to save the files to the server with thier original names, but i want to save the files with different names to avoid duplication of file names. see the following for what i have acheived uptill now :
strFileName = txtFileName.PostedFile.FileName
strFileName = System.IO.Path.GetFileName(strFileName)
'Save Uploaded file to server
strFileNamePath = strFileFolder & strFileName
If Not (txtFileName.PostedFile Is Nothing) Then
Try
txtFileName.PostedFile.SaveAs(strFileNamePath)
Catch ex As Exception
Response.Write("Error Saving File <Br> " & ex.Message.ToString)
Return False
End Try
Please help me ! I would really appreciate if you would write me some code, not only explain me !