简体   繁体   中英

C# textbox endline

What I'm trying to do is insert, from a text box, into a MS Access database some text (no surprises). Thing is that after submitting what I have written, when I open the Access database it all appears as one string of text. So my question: is there a way in which I can determine the end of the text box per line so that when it reaches that point it would make a new line? Or something similar so that it would introduce a new line into the database file because this issue is very annoying.

PS: Yes the multiline option is enabled.

Thank you very much.

I believe you are trying to solve a non-problem. Quite possibly you'll find that you will want to show the same text in a number of different places within your application or even different applications (if it's not true now it MIGHT be true at some point in the future), so it should the the GUI to decide where and when break a text line, not your DB

您可以在文本框的文本中检测Environment.NewLine ,也可以使用Lines属性单独访问每行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM