PDA

View Full Version : writing test into asp code


martha.a
10-17-2004, 01:34 PM
Hello!!
How shall I add text in between code?

e.g. Request.Form("full_name") mytext & Request.Form("company_name")

Thanks :rocker:

eRad
10-18-2004, 09:10 AM
Well if you are constructing a string then simply use &'s..

Request.Form("full_name") & "some text" & Request.Form("company_name")

and if you want that to print out literally to HTML then just wrap the entire thing with a Response.Write( )

martha.a
10-18-2004, 11:39 AM
Ok you re right, but what if I want mytext to begin in a new paragraph? I tried "<p>mytext</p>", but I guess it's wrong cause It didn't work.

putts
10-18-2004, 11:48 AM
You could put the <br> in there just to force the break to start a new paragraph. That almost always works for me.

jimmy_d
10-18-2004, 02:24 PM
This does work...

<%response.write(Request.Form("full_name") & "<p>some text</p>" & Request.Form("company_name"))%>

eRad
10-18-2004, 02:33 PM
Originally posted by martha.a
Ok you re right, but what if I want mytext to begin in a new paragraph? I tried "<p>mytext</p>", but I guess it's wrong cause It didn't work.
that should work o_O

EDIT: See above