Professional Web Applications Themes

ntext formatting - ASP Database

I have an ASP page that submits a form to a SQL database. There is a textarea that submits to an ntext field. When I output this to an ASP page using a Select statement it is all one string. Is there a way to make this appear exactly like the user enters it into the original text box? I have tried wrap=hard. When I look at the field in the database it looks like it was entered but when it is outputted to the page, it is still one string. Any help would be greatly appreciated. Thanks! Darren...

  1. #1

    Default ntext formatting

    I have an ASP page that submits a form to a SQL database. There is a
    textarea that submits to an ntext field. When I output this to an ASP page
    using a Select statement it is all one string. Is there a way to make this
    appear exactly like the user enters it into the original text box? I have
    tried wrap=hard. When I look at the field in the database it looks like it
    was entered but when it is outputted to the page, it is still one string.
    Any help would be greatly appreciated. Thanks!

    Darren


    Darren Woodbrey Guest

  2. #2

    Default Re: ntext formatting

    The key isn't to get your data to look like it, it's to think about how the
    HTML has to be written to get the data to be displayed the way you want it.

    How about:
    sValueFromDB = Replace(sValueFromDB, vbCrLf, "<br>")

    Ray at work

    "Darren Woodbrey" <darrenwoodbreyhpfairfield.com> wrote in message
    news:Ou$wliBKEHA.3084TK2MSFTNGP11.phx.gbl...
    > I have an ASP page that submits a form to a SQL database. There is a
    > textarea that submits to an ntext field. When I output this to an ASP
    page
    > using a Select statement it is all one string. Is there a way to make
    this
    > appear exactly like the user enters it into the original text box? I have
    > tried wrap=hard. When I look at the field in the database it looks like
    it
    > was entered but when it is outputted to the page, it is still one string.
    > Any help would be greatly appreciated. Thanks!
    >
    > Darren
    >
    >

    Ray at Guest

Similar Threads

  1. MS SQL 2005 and ntext
    By cheftimo in forum Coldfusion Database Access
    Replies: 3
    Last Post: March 15th, 04:10 AM
  2. Can't seem to get the SQL 2000 ntext value from thedatabase
    By ii_bar in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: October 3rd, 03:35 PM
  3. Lenght of NText field
    By PHRED-SE in forum Coldfusion Database Access
    Replies: 1
    Last Post: June 11th, 10:56 PM
  4. createparameter ntext
    By Mark Silka in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 11th, 01:56 PM
  5. nText
    By Rocky in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 8th, 12:56 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139