New line character in classic ASP

Below is my string and i m using <br> to acheive a new line in the browser but it does not work. I have also tried \n and vbcrlf but non are working for me. Any ideas

<% Email=Username & " has placed a request for a journal article. The details of the request are below Purpose of Request: " & ReqPurpose & " <br> Title of Journal: " & Jnltitle & " <br> Source: " &SourceName & " <br> ISSN: " &Request.Form("txtISSN") & " <br> Journal Year: " &Request.Form("txtJrlYear")  & " <br> Journal Volume: " &Request.Form("txtJrlVol") & " <br> Journal Part: " &Request.Form("txtJrlIssue") & " <br> Article: " &Request.Form("txtAuthororArticle") & " <br> Title of Article: " &Request.Form("txtTitleOfArticle")  & " <br> Pages to Photocopy: " &Request.Form("txtPagesToPhotocopy") & " <br> Notes to Library: " &Request.Form("txtNoteToLibrary") & ",<br> Thank you" %>
mmalik15Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

baretreeCommented:
are you using vb?

& vbCrLF & " Title of Journal bla bla " & Jnititle & vbCrLF & " bla blah"
0
Wayne BarronAuthor, Web DeveloperCommented:
It works for me, just as it is.
What browser are you using?

I test with the new Google Chrome and IE8

Carrzkiss
0
baretreeCommented:
not only the browser but if using for example html5 or xhtml you need to use <br /> so it'd be good to know browser + html version
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Wayne BarronAuthor, Web DeveloperCommented:
baretree is correct.
I forgot all about the <br />, that is usually the first thing I get people to change over.
0
mmalik15Author Commented:
i did try <br /> as the first thing and tried them in both IE and firebox. This is how i m sending the email

<% Email=Username & " has placed a request for a journal article. The details of the request are below Purpose of Request: " & ReqPurpose & " <br> Title of Journal: " & Jnltitle & " <br> Source: " &SourceName & " <br> ISSN: " &Request.Form("txtISSN") & " <br> Journal Year: " &Request.Form("txtJrlYear")  & " <br> Journal Volume: " &Request.Form("txtJrlVol") & " <br> Journal Part: " &Request.Form("txtJrlIssue") & " <br> Article: " &Request.Form("txtAuthororArticle") & " <br> Title of Article: " &Request.Form("txtTitleOfArticle")  & " <br> Pages to Photocopy: " &Request.Form("txtPagesToPhotocopy") & " <br> Notes to Library: " &Request.Form("txtNoteToLibrary") & ",<br> Thank you" %>

<% emailnotification = "****@gmail.com" %>
<% emailsentto = "****@gmail.com" %>

<%
Set objMail = Server.CreateObject("CDONTS.NewMail")

objMail.Send emailnotification,emailsentto,"New Journal Request Waiting",Email,2

Set objMail = nothing
%>



dont know if there is something else causing this prob
0
mmalik15Author Commented:
I am using the default html set in vs 2010 and guess its 1.0 and iv tried in IE 9.0
And the latest version of firefox. I've used <br /> frequently in asp.net without any line break issues. I m a begginner in ASP and don't know what I am doing wrong  here
0
SeonyxCommented:
Thing is you can send an using CDONTS as either text only, HTML or multipart. If you send as text use VbCrLf to do line breaks. If you use HTML use <br> or <br /> (they while probably both work despite breaking validation). At the moment you seem to be trying to send a text email with html line breaks, so the received message won't be interpreted as html and the line breaks will fail. Try using a full html message complete with body tags etc as per this article.http://support.microsoft.com/kb/189945
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Wayne BarronAuthor, Web DeveloperCommented:
CDONTS is a bad thing to use, it is not used by many any more.
CDOSYS, is what everyone is using, either than 3rd party tools.
www.powerasp.com/content/new/sending_email_cdosys.asp
Method 3 is what I use.
In the option, use
ObjSendMail.HTMLBody
and with this, use your <br />

Good Luck
Carrzkiss
0
sybeCommented:
The definition of a "new line" differs per operating system. There is the "linefeed" and the "carriage return", look them up on http://www.asciitable.com. The first has ascii code 10 the second has ascii code 13. Windows uses "carriage return" + "linefeed". Linux systems do only with "linefeed". Older Apple systems did only "carriage return" (not sure if that still is the case with the BSD-based apple OS).

In VBScript you can generate ascii code characters by CHR(n), where n is the number.

Usually CHR(10) is enough to get a new line, even in Windows (but it does for example not work is Windows Notepad).




0
mmalik15Author Commented:
Thanks guys
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.