Log in

View Full Version : Inserting breaks into email body text on asp form



jianxin9
03-28-2008, 05:15 PM
Does anyone know how I can insert breaks into this code, so that in the email I can get the different parts to be on different lines. Thanks! I have tried adding "br" and "p" and "vbCrLf" with no luck.


// Create the email body text
String bodyInfo = fname.Text+" "+lname.Text+" has taken the exam.\n"+fname.Text +" has scored: "+score+" out of 7..\n"+fname.Text +"`s options were: \n 1. Option "+(q1.SelectedIndex+1)+"\n 2. Option "+(q2.SelectedIndex+1)+"\n 3. Option "+(q3.SelectedIndex+1)+"\n 4. Option "+(q4.SelectedIndex+1)+"\n 5. Option "+(q5.SelectedIndex+1)+"\n 6. Option "+(q6.SelectedIndex+1)+"\n 7. Option "+(q7.SelectedIndex+1);

jianxin9
03-28-2008, 07:09 PM
problem has been resolved

dsagrera
03-29-2008, 01:36 PM
If you're stuck with this problem, the solution is inserting a "Chr(13)" character use it as you use variables in middle of strings, example:


textstr = "This is line 1" & Chr(13) & "This is line 2"

Regards! :D