简体   繁体   English

加 <br> 或Textarea文字中的段落

[英]Add <br> or paragraph in Textarea Text

I am using textbox for allowing user to enter any text they want, then I am emailing this text. 我正在使用文本框允许用户输入他们想要的任何文本,然后通过电子邮件发送此文本。 I want to add paragraphs or 我想添加段落或
in textarea text for eg if user enters this 在textarea文本中,例如,如果用户输入

this is test this is test this is test this is test this is test this is test
this is test this is test this is test this is test this is test

Then the email wil appear with whole text in one line, I want it to appear like two or three paragraphs something like this 然后,电子邮件将在整个一行中以全文显示,我希望它像两个或三个段落一样显示

<p> this is test this is test this is test </p>
<p> this is test this is test this is test </p>

How I can do this in C# 我如何在C#中做到这一点

In textarea \\n added on pressing of Enter key. 在文本区域\\n加在按Enter键。 replace \\n with <br/> on server side. 在服务器端将\\n替换为<br/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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