Forum Moderators: open

Message Too Old, No Replies

PHP to ASP

\n meant a new line in php...

         

cmatcme

6:29 pm on Mar 8, 2005 (gmt 0)

10+ Year Member



I'm trying to do a mail button from a link submitted earlier in a form.

Eg

***
response.write "mailto:example@example.com&From=" & request("visitormail") & "Body=" popupnotice & "<br>" sendprompt & "<br>" & "<br> " & cbody ""
***

But my problem is when using <br> tags for signifying new lines, in the mail window

<br>
shows up.

In php, a simple way to resolve this problem was to do \n where you wanted a new line:

Eg

***
popupnotice & "\n" sendprompt & "\n" & "\n " & cbody ""
***

What's the alternative to \n in asp?

CaseyRyan

6:50 pm on Mar 8, 2005 (gmt 0)

10+ Year Member



You can use Chr(13).

Some people use Chr(13)&Chr(10).

-=casey=-

cmatcme

7:55 pm on Mar 8, 2005 (gmt 0)

10+ Year Member



Thanks. :)

mattglet

9:02 pm on Mar 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also use VbCrLf.

i.e.

Reponse.Write("Here's a line of text." & VbCrLf & "This will be a new line.")