Results 1 to 3 of 3
  1. #1
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Forcing a NEW LINE in ASP

    Is there a way to force a new line using Response.Write?
    I've got an ASP include that I'm using to write a snippet of JavaScript. Unfortunately, when I use Response.Write it all comes out on one line and the JavaScript refuses to run properly.

    Thanks for any insights you can offer!
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forcing a NEW LINE in ASP

    Try the constant: vbcrlf

    Such as: Response.Write("blahblahblah" & vbcrlf & "blahblahblah")
    You can also use vbtab to indent.

    While we're on the topic, within a Javascript string you can use n to create a new line (that's backslash + n).
    Such as: alert('This is a testnof the emergency alert-message system.');

    Post back if that doesn't do the trick for you...

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Forcing a NEW LINE in ASP

    That did it - Thanks!
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •