Inserting breaks into email body text on asp form
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.
Code:
// 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);
Response for those who still doesn't know...
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:
Code:
textstr = "This is line 1" & Chr(13) & "This is line 2"
Regards! :D