1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2012
    Rep Power

    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?
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Columbus, OH
    Rep Power
    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
  4. #3
  5. 0x800A0C93
    ASP Super Hero (2500 - 2999 posts)

    Join Date
    Jan 2009
    Ridin' through this world...
    Rep Power
    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

Similar Threads

  1. Replies: 1
    Last Post: November 21st, 2009, 12:12 AM
  2. Why won't my asp page display properly?
    By zalkin in forum ASP Development
    Replies: 3
    Last Post: September 5th, 2007, 03:09 AM
  3. MsgBox does not display properly
    By Row97 in forum Microsoft Access Help
    Replies: 2
    Last Post: October 12th, 2006, 07:44 PM
  4. It doesnt display properly as i inserted data
    By asifbhura in forum .NET Development
    Replies: 1
    Last Post: June 27th, 2006, 06:16 AM
  5. getting content from a database to display properly?
    By CdnNoName in forum ASP Development
    Replies: 1
    Last Post: October 25th, 2004, 05:28 PM

IMN logo majestic logo threadwatch logo seochat tools logo