December 10th, 2012, 02:06 PM
Unable to get ASP variables to display properly in browser
Please forgive me if this is a remedial question. I'm traditionally a java developer and I've been asked to "tweak" an existing classis ASP web site my organization has. Basically what this site does is collect information from a form and construct an email to be sent. I've been asked to add additional functionality so that once the form has been emailed the user can print the information they entered. I figured the easiest way to solve this is the take the text of the email and display it in a browser window with a link to print the page. So in my sendmail.asp file I added the following line of code..
Session("emailText") = Replace(message,"vbcrlf","<br />")
Then in the printResults.asp file I created it's a basic HTML file but with the following line of code in the body...
<% Response.Write(Session("emailBody")) %>
When the page renders I do get the value displayed on the web page but it's one long string of text. It's not recognizing the line breaks even though I changed them to HTML line breaks.
Since I'm new to ASP I don't know why it's not recognizing my line breaks. Any of the searches I have done suggest that changing "vbcrlf" to "<br />" should have worked but it didn't. What could I be missing?
December 10th, 2012, 02:59 PM
it is deepens from how you build your message
you have somewhere you your code message=message & "Some text" & (vbcr or vblf or chr(10) ...)
you need replace last portion ov that line with "<br />"
if you found this post is useful click Give Rep button (bottom side on this reply ) and agree
December 10th, 2012, 11:56 PM
Try no quotes on vbCrLf. Right now you are looking for the nonexistant string "vbcrlf".
Brinkster- free development account. Not affiliated, but I sure like free. Brinkster.com