Open File dialog to select files in ASP.NET with full path
Posted on 2011-10-05
Hi, I want to know if there is a way to select a file in ASP.NET that gives me not only the filename, but also the full path of the selected file; my intention is to use the full qualified path to add an attachment in a MailMessage object, which sends emails from the web page (pushing a button), to some clients emails addresses.
I don't want to upload the files to the server, but to use the web page to select a file, create with it an attachment in an email, and then send it to some address.
I tried to use the FileUpload object, but even if the full path is displayed, I can't access it in the code because some design restriction; I want to know how can I accomplish this easily.
Thanks in advance.