PDA

View Full Version : replacing /n with <br>



nickyfraggle
07-09-2007, 10:47 AM
Hello,

I usually code in php, but I've been asked to do some work in asp. I'm looking for the asp code to replace /n with <br>.

Thanks,

Nicky

Daemonspyre
07-09-2007, 01:46 PM
May I safely assume that you mean '\n' or NewLine?

If you want to do that in ASP, it's

replace(string_to_search,text-to-remove,text-to-insert)

So, for you: replace(string_to_search,"\n","<br />")

You can also use: replace(string_to_search,vbCrLf,"<br />") where vbCrLf means "Visual Basic Carriage Return Line Feed".

nickyfraggle
07-09-2007, 03:17 PM
Thanks for your help. That was what I meant.

I tried to use the mySQL replace command but I think I was doing something wrong as it kept erroring!

Thanks for your help. I'll let you know how it goes.

Nicky