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
Building a Web Application Security Program
The Art & Science of JavaScript - Free 100 Page Preview!
Integrating Silverlight 4 with SharePoint 2010 - Free 42 Page Sample Chapter