KaiserSose
asked on
Send an aspx page as MailMessage.Body
I have sent mail many times so I know how to construct the MailMessage and send it. I want to email a very detailed report of stuff pulled from a database. I want to have page A have a textbox and button where you enter the users email and click go. Piece of cake right? Well, I'd like to avoid having one giant body string that I have to append 500 small strings and variables together to create.
I would love it if it is possible to do something like:
SmtpMail.body = pageb.aspx
The page would be fully working if you navigate to it, and do all the necessary information calculation. Is this even possible?
Thanks for looking
dave
I would love it if it is possible to do something like:
SmtpMail.body = pageb.aspx
The page would be fully working if you navigate to it, and do all the necessary information calculation. Is this even possible?
Thanks for looking
dave
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
An attachment wouldn't be too bad, but I don't think sending an aspx page is the best file format. Actually, now that you mention it, an attachment might be the best way to go. Is this still possible? What I want is an html formatted report. So it would basically be exactly like you navigated to whatever.com/pageb.aspx, but it would probably have to be sent as .html and not .aspx because the user will absolutely not have connectivity to the db. Page b contains a bunch of code behind stuff that pulls many values from a db and formats the report.
Thanks for the help
dave
Thanks for the help
dave
ASKER
Oh, page b doesn't have any super complex values, just alot of billing data. The report would basically just be tables with headers and values.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I decided not to send the report by email, the people reading the report preferred to see it online. Thank you both for helping.
dave
dave
Regards,
Razzie