Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 code for browsing files using
Posted by rajesh on  8/11/2008 12:54:41 AM Category: ADO.NET
Add to my favorites
Email to friend
hai frds can u say how to attach the file using if u know plz forward the code.

Post Your Reply Post New Question

 Viewer's Reply
You want to attach the File in Email
Answered By Moderator1 on 10/15/2008 9:33:54 AM
To attach files in emails in Asp.Net application you can use

MailAttachment attach = new MailAttachment("YourFilePath.txt");

To browse the file, just use FileUpload control. and then attach the path in the MailAttachment object. Then using the MailMessage class's Attachment property you can attach a file to the email.
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Backup and Recovery Best Practices for Microsoft SQL Server 2005
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Simply JavaScript - Free 150 Page Preview!