多行文本框中的换行符 [英] Newline in Multiline Textbox

查看:758
本文介绍了多行文本框中的换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须在邮件中显示多行文本框值.如何显示输入到文本框中的换行符(使用Enter键)?
谢谢...

Hai all,

I have to display multi line textbox values into the mail. How can I show the newline (using Enter key )that entered into the textbox?
Thanks...

推荐答案

在文本框属性Textmode中,选择多行
In textbox property Textmode choose multiline


如果您要发送HTML格式的电子邮件,请替换为"\ r \ n由< br/>"
Incase you are sending HTML Format emails, then replace "\r\n" by "<br />" in your string.


,您应该从数据库中找到输出文本,无论是(& amp; lt br \& amp; gt;)还是(& lt br \& amp; gt))或(< br/>).
如果您已经知道数据库的输出,请使用replace函数.

示例:字符串描述= HttpUtility.HtmlDecode(b2u.Description).替换(< br \>","\ n");
you should find the output text from a database, whether in the form (&amp;amp;lt; br \&amp;amp;gt;) or (&amp;lt; br \ &amp;gt;) or (<br />).

if you already know the output of the database use the replace function.

example: string description = HttpUtility.HtmlDecode (b2u.Description). Replace ("<br \>", "\ n");


这篇关于多行文本框中的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆