MS Access Memo Field and ASP

Discussion in 'ASP General' started by Jim Plante, Aug 6, 2003.

  1. Jim Plante

    Jim Plante Guest

    I have a memo field in a MS Access table. The contents of the field may look
    like this:

    1. This is number one
    2. This is number 2

    3. Skipping lines is fun if your #3

    But when I write it out to my web page using my ASP code {something like:
    rsJobs.Fields("notes") }

    it looks like this on the web page:

    1. This is number one 2. This is number 2 3.Skipping
    lines is fun if your #3

    How can I make it show up like it is in the memo field - it seems like the
    carriage return / line feeds are being ignored or translated into spaces or
    something

    Can anyone help ?

    Thanks,
    Jim
    Jim Plante, Aug 6, 2003
    #1
    1. Advertising

  2. HTML doesn't respect white space -- imagine if it did?

    <table>
    <tr>
    <td>foo</td>
    </tr>
    </table>

    There would be a bunch of tabs and carriage returns rendered to the browser!
    I'm glad HTML disregards this white space, otherwise we'd go absolutely
    nutso maintaining strictly coded (and hence unreadable) HTML pages ... and
    presentation would be tied to coding, yuck. The whole beauty of HTML is
    that the code doesn't have to look anything like the presentation.

    Remember that an ASP page is simply returning HTML to the browser, and that
    when your memo column contains

    line 1
    line 2

    This is what gets inserted directly into the HTML. So, to replace white
    space, see http://www.aspfaq.com/2188







    "Jim Plante" <> wrote in message
    news:...
    > I have a memo field in a MS Access table. The contents of the field may

    look
    > like this:
    >
    > 1. This is number one
    > 2. This is number 2
    >
    > 3. Skipping lines is fun if your #3
    >
    > But when I write it out to my web page using my ASP code {something like:
    > rsJobs.Fields("notes") }
    >
    > it looks like this on the web page:
    >
    > 1. This is number one 2. This is number 2 3.Skipping
    > lines is fun if your #3
    >
    > How can I make it show up like it is in the memo field - it seems like the
    > carriage return / line feeds are being ignored or translated into spaces

    or
    > something
    >
    > Can anyone help ?
    >
    > Thanks,
    > Jim
    >
    >
    Aaron Bertrand - MVP, Aug 6, 2003
    #2
    1. Advertising

  3. Jim Plante

    MePadre Guest

    <%= replace(rs("memoField"),vbcrlf,"<br>") %>

    or

    <p><%= replace(rs("memoField"),vbcrlf,"</p><p>") %></p>


    >-----Original Message-----
    >I have a memo field in a MS Access table. The contents of

    the field may look
    >like this:
    >
    >1. This is number one
    >2. This is number 2
    >
    >3. Skipping lines is fun if your #3
    >
    >But when I write it out to my web page using my ASP code

    {something like:
    >rsJobs.Fields("notes") }
    >
    >it looks like this on the web page:
    >
    >1. This is number one 2. This is number 2 3.Skipping
    >lines is fun if your #3
    >
    >How can I make it show up like it is in the memo field -

    it seems like the
    >carriage return / line feeds are being ignored or

    translated into spaces or
    >something
    >
    >Can anyone help ?
    >
    >Thanks,
    >Jim
    >
    >
    >.
    >
    MePadre, Aug 6, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWF0dA==?=

    Update Access Memo field from ASP.NET

    =?Utf-8?B?TWF0dA==?=, Apr 11, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    5,978
    =?Utf-8?B?TWF0dA==?=
    Apr 11, 2005
  2. Hanno

    Display an Access Memo field in a GridView or DetailsView

    Hanno, Aug 4, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    262
    Ken Cox [Microsoft MVP]
    Aug 6, 2006
  3. euang
    Replies:
    8
    Views:
    213
    Foo Man Chew
    Nov 24, 2003
  4. Hugh Welford
    Replies:
    3
    Views:
    152
    Hugh Welford
    May 21, 2004
  5. Vincent Lau

    Display Access memo field

    Vincent Lau, Sep 28, 2005, in forum: ASP General
    Replies:
    2
    Views:
    305
    Darryl
    Sep 28, 2005
Loading...

Share This Page