Results 1 to 5 of 5

Thread: ASP and line break

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question ASP and line break

    How do I make a line break between these strings in ASP?
    Code:
    <%
    ...
    var strBody = "Members:"
    var strBody1 = "Name: " + navn 
    var strBody2 = "Company: " + firma
    mailer.Body = strBody + strBody1 + strBody2   
    ...
    %>
    I want the result to be displayed like this:
    Members:
    Name: ???
    Company: ???

    instead of
    Members: Name: ??? Company:???

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    vbCrLf
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    Sorry, I don't understand. Is it a method?

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    No, it is a variable holding the value for Carriage Return/Line Feed. I notice that you are using a "var" keyword, so you are not writting a VBScript ASP. I assume it is JScript. So I will further assume that JScript is like JavaScript, in which case...

    Code:
    var foo = "bar\nblah";
    The control sequence \n would be carriage return/line feed.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    Just what I needed, thanks!

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