Solved

asp.net vb email carriage returns

Posted on 2014-10-24
2
119 Views
Last Modified: 2014-10-24
Email body carriage returns not working.  What am I doing wrong?

   message.Body = "Name:  " + txtName + vbCrLf + vbCrLf _
                + "Site #:  " + txtSite + vbCrLf + vbCrLf _
                + "Expertise: " + txtExpertise + vbCrLf + vbCrLf _
                + "Interests: " + txtInterests + vbCrLf + txtPC + vbCrLf + vbCrLf _
                + "Comments:  " + txtComments + vbCrLf + vbCrLf
  message.IsBodyHtml = True
0
Comment
Question by:ClubGen
2 Comments
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 40402720
Since you're setting the body type to HTML, you need to replace vbCrLf with "<br>" which represents a line break in HTML.
0
 

Author Closing Comment

by:ClubGen
ID: 40402825
Thanks
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

825 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