Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) If e.CommandName = "Approve" Then Dim gv As GridView = GridView1 Dim colFields As DataControlFieldCollection = gv.Columns For Each colField As DataControlField In colFields If TypeOf colField Is BoundField Then Dim email As BoundField email = CType(email, BoundField) Dim strFrom = "firstname.lastname@example.org" Dim strTo = email Dim MailMsg As New MailMessage(New MailAddress(strFrom), New MailAddress(strTo.DataField)) Dim Body As String ="a bunch of html code" MailMsg.BodyEncoding = Encoding.Default MailMsg.Subject = "Welcome!" MailMsg.Body = Body MailMsg.Priority = MailPriority.High MailMsg.IsBodyHtml = True 'Smtpclient to send the mail message Dim SmtpMail As New SmtpClient SmtpMail.Host = "localhost" SmtpMail.Send(MailMsg) End If Next Response.Redirect("adminApplications.aspx") End If End Sub
|Data accessibility among modules in a VB.NET application.||8||37|
|VB.Net - How to update a database||4||33|
|Changing amount of letter and color on column "J" when numbers on are being changed in column "I" automatically.||8||41|
|How would you translate VB.Net code into C# for a couple of statements?||4||14|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!