Results 1 to 8 of 8

Thread: newline

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    newline

    Why does this code not give me a newline when i view the source in the browser.

    Response.Write "<table width=100% align=center cellpadding=0 cellspacing=0 border=1>"
    Response.Write "<tr bgcolor=#c0c0c0><td>ID</td>"
    Response.Write "<td>Event</td>"
    Response.Write "<td>A</td><td>Points A</td>"
    Response.Write "<td>B</td><td>Points B</td>"
    Response.Write "<td>C</td><td>Points C</td>"
    Response.Write "<td>D</td><td>Points D</td>"
    Response.Write "<td>Total Kills</td><td>Total Points</td>"
    Response.Write "<td>Position</td>"
    Response.Write "<td>Date</td>"
    Response.Write "</tr>"
    Response.Write "</table>"


    Gary
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Because response.write doesn't do that. Its the way it is supposed to behave.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    Whats the alternative?
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You habe to manually write the newlines with vbcrlf if you want them:

    Response.Write "<table width=100% align=center cellpadding=0 cellspacing=0 border=1>" & vbcrlf
    Response.Write "<tr bgcolor=#c0c0c0><td>ID</td>" & vbcrlf
    Response.Write "<td>Event</td>" & vbcrlf
    ...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You could add & vbCrLf to the end of each line if you really need to see the end result.. I would rather if I were using response.write to do HTML, leave it packed tho..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446
    Thanks both.... any good at this one?
    http://www.vbforums.com/showthread.p...threadid=74435
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  7. #7
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I use <BR>
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  8. #8
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    <BR> would change the way the page is displayed. I think he is just trying to get the page to be readable when he does view source to debug..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width