Results 1 to 3 of 3

Thread: [Resolved] Displaying text/returns

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Earth 4 now.
    Posts
    27

    [Resolved] Displaying text/returns

    Hello I'm writing a ASP webaplication. I'm using a Access database.

    In that database I have a Table that has 1 field with DataType Memo.

    In this Memo field, there are sentenses that are sometimes ended with a return (linebreak).

    What do I do to display this field properly?

    This gets me the correct data:

    <%=rsComplaint("Description")%>

    When I put that on a webpage, as normal text, it writes all the sentenses behind each other and it ignores the returns (linebreaks).

    But when I put it in a <textarea><%=rsComplaint("Description")%></textarea> it does show the sentenses and the returns correctly.

    Now my problem is I just want to display it without the textarea, or if it has to be in a textarea, the textarea should be the correct size for the displayed text (not too big not too small.), without editting or scrolling options in the textarea.

    Editting can be disabled with <textarea disabled=true> </textarea>

    Current code:

    <TD colspan=11 style='font-size:10.0pt;padding:0cm 0.0pt 0cm 0.0pt'><textarea disabled=true cols="80" rows="auto" name="description"><%=rsComplaint("Description")%></textarea></TD>

    rows="auto" doesn't work. But something like that would be nice or better yet, a way without the textarea thing.

    Thanx a lot, I've tried and tried...



    Last edited by ShotokanTuning; Jul 7th, 2004 at 02:58 AM.

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    <%
    dim descr

    descr = rsComplaint("Description")

    descr = replace(descr, vbCrlf, "<BR>")

    Response.Write descr

    %>

    that will do the trick.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Earth 4 now.
    Posts
    27
    Thank you Danial.

    It works great.

    That's one for my code book.

    Thanks again.

    Don.
    Last edited by ShotokanTuning; Jul 7th, 2004 at 02:30 AM.

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