Author: uzairseedat | Posted on: 6/28/2008 7:01:07 AM | Views : 283

I'm creating a page that inputs info from the user and mails it using specified SMTP server. The problem is I've a FileUpload Control named 'fileArticle' that will be used to attach a file to the mail (MailMessage object name is msg). The page generates the error  Could not find a part of the path...  when the following lines execute:
Attachment article = new Attachment(fileArticle.PostedFile.FileName);
msg.Attachments.Add(article);
...

Go to the complete details ...