[thelist] Line breaks with ASP
Kevin Stevens
kjs at ratking.co.uk
Sun Oct 27 10:00:01 CST 2002
> VBCrLf is a VBScript constant, not a string. Don't put quotes around it.
>
> So make it:
>
> varDataLine = Replace(varDataLine, vbcrlf, "<br />")
>
> Does that work?
Thanks for the swift reply, unfortunately it doesn't. Here's an example of
what I mean, in the source the text reads...
Tools
Options
Connection
Hang up after sending and receiving
but on the browser it looks like...
Tools Options Connection Hang up after sending and receiving
Actually, looking at the source, another one of my replace function isn't
working either, what is wrong with this code?
Function EscapeDBData(varDataLine)
if not(varDataLine = "") then
varDataLine = Replace(varDataLine,"'","''")
else if not(varDataLine = "") then
varDataLine = Replace(varDataLine,"%","%")
else if not(varDataLine = "") then
varDataLine = Replace(varDataLine,vbcrlf,"<br />")
end if
end if
end if
EscapeDBData = varDataLine
End Function
The first line works, replacing ' with '' but the other 2 don't seem to
work.
Kevin Stevens
kjs at ratking.co.uk
More information about the thelist
mailing list