Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Attachments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
STEPHEN ANDRADE - 21 Sep 2007 17:44 GMT
I am currently designing a webform for sending email. I want to send an
attachment with the email. I am using the html Input File to pick the
location of the file I want to attach.

I find that there is no problem sending an attachment when there are no
spaces in the directory (e.g. c:\images\new.jpg) but if the path specified
has spaces (c:\documents and settings\my documents\new.jpg) then I am
getting http exception I have tried using different character instead of the
spaces

If uploadedfile.Value <> "" Then

Dim substring As String

substring = uploadedfile.Value.ToString 'uplodedfile = htmlinputfile

Dim Attach As MailAttachment = New MailAttachment(substring)

Message.Attachments.Add(Attach)

Response.Write(uploadedfile.Value)

End If

If you have any suggestions I wouuld love to hear them

Thanks in advance
Stephen
bruce barker - 21 Sep 2007 18:16 GMT
the htmlinputfile is the location on the client machine, not the server.
you should write the uploaded file to disk, then use that file as an
attachment.

-- bruce (sqkwork.com)

> I am currently designing a webform for sending email. I want to send an
> attachment with the email. I am using the html Input File to pick the
[quoted text clipped - 26 lines]
>
>  

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.