<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.