How to a attach a file

  • Thread starter Thread starter Irshad
  • Start date Start date
I

Irshad

Hello All,
Iam writing a .Net App for sending mails,I Need a attach
a file with the mail.
I would like to know there is any component in .Net where
I can used to for attaching a file,so that I can browse
the file from a directory and attach it.
Please let me know ASAP

Thanx All
 
just use the normal html control... file input control.
that way the user can browser the file and select the attachment...
once uploaded it will be a part of Request.Files
you have change the enctype to "multipart/form-data" for the form

regards,

HD
 
you could use System.Web.Mail.MailAttachment

check online help on MailAttchment constructor for sample code.
 
Back
Top