Forum Moderators: open

Message Too Old, No Replies

Sending an email attachment on ASP.NET

I need to send an email atachement from asp.net

         

mrfori

3:24 am on Jan 13, 2004 (gmt 0)

10+ Year Member



Hi guys,

I writting my first asp.net application.
I collect user data and other variables on the first 3 web forms. Store all the data on the Session.
Then I'll give them a report using a ASP:table control (of about 20 rows) .. and databind from other classes that i have created.

I have the user's email address and would like to send this report by email. But I can only attach jpg or pdf which i dont have .. I could send html in the body but i dont wanna replicate my asp:table .. Any suggestions?

korkus2000

1:06 pm on Jan 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using the System.Web.Mail.MailAttachment class? I thought tou could attach any file with that.

mrfori

11:20 pm on Jan 13, 2004 (gmt 0)

10+ Year Member



Put I dont have a file to attach yet .. i only have a static asp:table control with info on a webform.

korkus2000

1:49 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe a csv file would do what you want. Do a search for the format. It is pretty easy to generate and many programs can open it like excel. Generate the csv then attach it.

mrfori

2:12 am on Jan 14, 2004 (gmt 0)

10+ Year Member



Thanks Korkus for your help.
To give you a better idea.
the site is hosted on <snip>

Click on investment analysis and follow until you get to the report page. Thats the page I would like to send by email.

I dont see how csv would work
Thanks again ..

[edited by: Woz at 3:19 am (utc) on Jan. 14, 2004]
[edit reason] No URLs please, TOS#13 [/edit]