SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up how to put line break

    hi
    i wan to know how to put line break with ASP in ASP code,just ;ike in HTML <br>.i am new so want this basic thing.
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    Non-Member Dhen's Avatar
    Join Date
    Apr 2005
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    give me an example where you want to use the line break and ill give the answer

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    like i wan to write

    i am a boy
    i eat mangoes

    so in html
    we will write
    <body>
    i am a boy<br>
    i eat mangoes
    </body>

    so same thing how can i write in ASP in two lines means after 'i am a boy' i will go to the next line
    its urgent plzzz.....
    regards
    phphelp

  4. #4
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You can break out of ASP and use any HTML code you would like:

    Code:
    <%
    'asp code here
    %><BR><%
    'more asp code here
    %>

  5. #5
    Non-Member Dhen's Avatar
    Join Date
    Apr 2005
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that right or

    <%
    'asp code here
    %><p><%
    'more asp code here
    %>

    just to make another paragraph

  6. #6
    SitePoint Member
    Join Date
    Aug 2005
    Location
    Port Harcourt, Nigeria
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    They are all right but you still can insert it in your asp code like this
    <%="I ate mangoes<br>And bananas<br>etc " %>
    Just remember to put it in the " and " signs

  7. #7
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you all are right but i donot want to put html <br>.i want to do it with purely ASP means without html
    its urgent plzzz.....
    regards
    phphelp

  8. #8
    SitePoint Addict Richard Conyard's Avatar
    Join Date
    Jun 2005
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpHelp - ASP display is through HTML. You could do:
    Code:
    response.write "some text<br />some more text"
    or you could:
    Code:
    <pre>
    <%
        response.write "some text" & vbCrLf & "some more text"
    %>
    </pre>
    But HTML will be used.

  9. #9
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Cool

    I think that you are looking for the PHP "\n" equivalent in ASP, right?
    Well, if you are using VBScript in ASP, then you should use vbNewLine, like:
    Code:
    <%
    	strMyText = "Hello There!!" & vbNewLine
    	strMyText = strMyText & "How are you??"
    %>
    if you are using JScript in ASP, then you can use the "\n" just like in PHP.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


Bookmarks

Posting Permissions

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