Results 1 to 11 of 11

Thread: Kids play...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hello,

    A very easy one...

    How do you get a line break using response.write

    IE I want to write...

    response.write "Hello Turfbult, how are u" .... like this

    hello
    turfbult
    how
    are
    u

    Thanks,
    T

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi turfbult

    All you need to do to is include the <BR> tag in your string.

    Resposne.write "Hello<br>Turfbult,<br>how<br>are<br>u"

    Hope this helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Thanks Ian,

    Isn't there another way though, like "vbnewline" or something. Isn't it "bad practice" to mix asp and html??

    Wait... I might not have given a good example...

    Lets say I have 5 variables and want to print each one on a new line

    like ..

    var1
    var2
    var3

    If I just say
    response.write var1
    response.write var2 etc etc. it prints all variables in one row.

    So I'm thinking
    response.write var1 & vbnewline
    response.write var2 & vbnewline

    .....or something like that!!!



    Thanks,
    T
    Last edited by turfbult; Apr 10th, 2001 at 08:14 AM.

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Originally posted by turfbult
    Isn't it "bad practice" to mix asp and html??
    It's not bad practise at all, There are many cirumstances that you have to mix them together. Hell, asp is just a bolt on to html anyway

    As for using vbnewline, it won't work. Can't think of any other way, but there is no need to find it

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  5. #5
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    using your example you can trim it down to

    <% = Var1 %>
    <br>
    <% = Var2 %>
    <br>
    <% = Var3 %>
    <br>
    <% = Var4 %>
    <br>

    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Thanks, in that case, I'll use it.

    BTW. What is the cult for silver service??

    T

  7. #7
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    no worries.

    I'ts just a joke mate. Take a look around the chit-chat forum for the "Cult of the rusty spoons" And "the Cult for silver service"
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  8. #8
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    Instead of vbnewline, try: vbCrlf

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  9. #9
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi Sail3005

    It wont work using vbCrlf Either. If you use that or vbnewline it will just place the code on a new line in the produced output, but without the <br> tags the browser will interpret it as the sam line. Eg.

    In HTML

    Hello
    World

    Will show in the browser as Hello World

    Wheras

    Hello
    <br>
    World

    Will show in the browser as

    Hello
    World


    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  10. #10
    hellswraith
    Guest
    Just a note, ASP produces HTML. So mixing them together is the same. All ASP does is process the code on the server, then creates HTML to send to the users browser.

  11. #11
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    Yeah, i agree now. I think the best and possibly only way to accomplish that is with <br>.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

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