I have a report created thru an ASP.NET table and I want to send an email message containing this report in the body of the message not as an attachment including the table layout and content. How can this be done in c#? Thank you Dov
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I put together the following code from an article at this site http://authors.aspalliance.com/stevesmith/articles/dotnetemailwebsite.asp which I found thru a question asked here “Best way to create complex html email message with asp.net, how?”, and from this article How to Print in ASP.NET 2.0 http://www.dotnetcurry.com/ShowArticle.aspx?ID=92.
I use an asp.net panel so that I can get only parts of the page and not the whole page so that you can send a table, in my case, without having to send the button which activates sending the email or any other part of the page which I don’t want to send.
NOTE: Any style properties for controls sent must be set directly to the controls and not thru cssclass.
This is the code:
With this code I sent an asp.net table generated and populated in background code and it worked perfectly.