Am having trouble retrieving Modified Date of file during a file upload process using

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leself
    New Member
    • Nov 2014
    • 1

    Am having trouble retrieving Modified Date of file during a file upload process using

    I can display the full path of the file including the name, and then I try using GetLastTime or LastWriteTime and I receive 12/31/1600...so from my research I found that it can't find the file, but I'm displaying the path to see that I do know where my file is. But I added logic to include FileExists and it doesn't recognize it. So I've tried to step back to determine how to get an accurate path and I am unsure at this point...and I question that this is the problem because I display the path on the page and it is correct. I am stepping into this as a new person to asp.net and there must be some small piece I am missing. My research doesn't really come up with much though and what I do find goes different directions, or else just stops without a solution. One way I've retrieved the path is with the following command - I've tried several:

    oPath = System.IO.Path. GetFullPath(txt Upload.PostedFi le.FileName)

    moddate2 = System.IO.File. GetLastWriteTim e(oPath)

    Thank you for your help!
Working...