How to implement non-line reading after MultiLine wrapping

Source: Internet
Author: User

<Asp: TextBox ID = "txtRecord" TextMode = "MultiLine" Columns = "30" Rows = "10" runat = "server"/> the input content contains line breaks and is saved to the database, if you directly check whether there is a line break, but the query result is displayed in text format, you will find that there is a line break.

Next, the question is: why is there no line break when reading the page ??!! Check N multiple documents and find:
 
I understand, but what is easy to mislead is that "line breaks" and "carriage returns" and "display results in text format" all change to a line.
After testing, we found that the ASP. Net text field is inserted with the "linefeed" CHAR (10). Oh, that's all. For laruence, I don't need to talk about it anymore.
But let's take into consideration the fact that there are many new users:
LblInfo. text = dt. rows [0] ["Info"]. toString (). replace ("CHAR (10)", "<br>"); Error !!!!!!!!!
CHAR (10) is not a text, so it cannot be replaced.
Insert a line feed in SQL.
Copy codeThe Code is as follows:
Insert into Order_Messages values ('', 'aaa' + char (13) + 'nbbb ', 1, getdate () -- pay attention to the red part

So the program should handle this as follows:
Copy codeThe Code is as follows:
Select top 1 *, REPLACE (contents, char (10), '<br>') AS Cont FROM Order_Messages

This should be okay ...... Well, some people say that my page has the editing function, but some edits <br> are taken out ....... Good guys: txtRecord. Text = lblSCLTJL. Text. Replace ("<br>", "\ r \ n ");
OK, complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.