Open File dialog to select files in ASP.NET with full path

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.
Who is Participating?
As far as I know you have to upload the image to the server.  Javascript is very limited on how it can interact with the fileupload control.
Ever user gmail, hotmail, yahoomail? All of them are web based email solutions, and in all of them if you attach a file to an email, you are basically uploading the image to the server first.

Only way you might be able to do this is if you used ActiveX or a Java Applet; but these days those are considered pretty non-user friendly as they are so obtrusive.
you could use a third party control like uploadify for this task. u can get the full control of the file being uploaded..hence u can say "not to upload the file" and instead save the binary of the file as a session object.. (then u can get the file from the session while sending the email)..all these can be controlled using a handler file.

hope this tip helps u
Anurag ThakurTechnical ManagerCommented:
the following link might guide you to achieve what you need

the link shows normal html controls but similar web control is also there but i was not able to find it
If i find it I will post it here
GHR_GDLAuthor Commented:
Your comment give the clue to understand the sequence of events that are fired when using the FileUpload control; indeed it's necessary to upload the file first to the server and then send it. The email sending process occurs in the SERVER, so the CLIENT file path I was trying to get is irrelevant; rather I need to know the file path of the file uploaded in the SERVER, and then create and send the attachment.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.