Results 1 to 3 of 3

Thread: [2005] storing textbox content preserving newlines+ white spaces

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    [2005] storing textbox content preserving newlines+ white spaces

    I'm trying to update/insert a record in SQL 2005 perserving all the formatting (like new lines ..etc) . I used datatype "varchar(MAX)" in the database . The update/insert works but for some reason the formatting of the text is ignored.I'm using databinding btw.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] storing textbox content preserving newlines+ white spaces

    Step through your code till you get to the part where it updates, and try to look at the updatecommand being generated for it. Is the text formatting in there?

    How do you know it is not preserving formatting? Newlines appear as \n rather than <br/> so if you're trying to display it again, it won't show up as <br/> unless you perform an explicit replace.

  3. #3

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: [2005] storing textbox content preserving newlines+ white spaces

    I don't know how they save documents with rich text content...for the update command , it doesn't tell much ..it contains some paramters.

    when i type \n within the text , it shows up as "\n" so it's not interpreted as newline.
    I want it to show the output text as i entered it with tabs whitespaces and newlines..etc

    Maybe i need to serialize the whole content and save it !

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