Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-03
4
Medium Priority
?
172 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 50 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 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