-
Multiple lines output?
I am using <TEXTAREA> as input from a form and submit it to SQL Server, and i keyed in multiple lines in. But when I use "response.write recobj(msg)" to display out as HTML, it came out in a single line. I tried to use "response.write server.HTMLEncode(recobj(msg))", it still the come out as single line as well. Please help, thanks.
-
you need to swap CRLFs for <BR>s
x.htm
Code:
<HTML>
<BODY>
<FORM action='z.asp'>
<TEXTAREA name=t>
</TEXTAREA>
<input type='submit'>
</FORM>
</BODY>
</HTML>
z.asp
Code:
<%@ Language=VBScript %>
<HTML>
<HEAD>
</head>
<BODY>
<%
dim t
t= replace(request("t"),vbCrLf,"<BR>")
response.write(t)
%>
</BODY>
</HTML>