On the right you find the list of snippets published on this Web site in the category ASP.NET 2.0 conveniently split up in pages.
If you can't find what you're looking for, try another category from the sub menu
|Site Section||ASP.NET 2.0|
|12/8/2006 4:25 PM|
With previous versions of ASP.NET you couldn't attach an uploaded file directly to a mail message. Instead, you needed to save the file to disk, attach it to the mail message and then when sending the message succeeded you had to clean up the old file again.
This not only meant a lot of work, it also had some security implications. Because the file needed to be written to disk, the account used by the web server required write permissions to a folder to store the attachments.
Now, with the new constructors for the Attachment class from the System.Net.Mail namespace, these problems are gone....