I am working with files and I don't really understand how to make it work.
I have a web application (c#) that is located on the server and users use this application to upload some information from the files. The problem that I am having that users upload the file (using HttpPostedFileBase
class) from their local machines but code is trying to match the same path on the server and of course the file doesn't exist on the server, that's why it throws an error saying that
Cannot find a part of the path ...
If the user is trying to upload the file from C:\Users\User1\Documents\File.txt
from their local machine how can I write the code to include the whole path to the file including the computer name and the local drive something like \\ComputerName\c$\Users\User1\Documnets\File.txt
.