Solved

How can i send data grid content to email using asp.net?

Posted on 2008-10-03
4
169 Views
Last Modified: 2012-05-05
may i know How can i send data grid content to email using asp.net?

the simplest way...
0
Comment
Question by:kengkit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 21

Expert Comment

by:silemone
ID: 22635611
you have to iterate through grid rows and add them as the content of your email...
0
 

Author Comment

by:kengkit
ID: 22636143
ermm.. any code provide?

The following is what i using to send email:

    Private Function sendmail()

        Dim content As String

        content = "Hello"

        Dim myMessage As New MailMessage
        Dim myMail As SmtpMail
        myMessage.From = "admin@abc.com"
        myMessage.To = Me.txt_email.Text
        myMessage.Subject = "Welcome to My Home "
        myMessage.Body = content

        myMail.SmtpServer = "210.48.217.15"
        myMail.Send(myMessage)


    End Function
0
 
LVL 21

Accepted Solution

by:
silemone earned 25 total points
ID: 22636469
well what i would do first of all is use a stringBuilder to build my content...so content would be a stringbuilder...

So upon iterating through the cells of the grid, I would add needed data to StringBuilder and then I would

make myMessage.Body = stringBuilderName.ToString()...
0
 
LVL 21

Expert Comment

by:silemone
ID: 22636480
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question