问题描述
我像这样为 Multiline Textbox 设置了一个值.
I set a value for a Multiline Textbox like this.
textBox1.Text = "Line1
Line2";
但是,输出中只有一个行距.
But, only one line space in output.
当我读取文本框的值时,我读取了 "Line1
Line2";
When I read the value of textbox, I read "Line1
Line2";
为什么 ASP.NET 不支持多于一个的换行符?
Why does ASP.NET not support more then one lineline character?
推荐答案
我也遇到了同样的问题.如果我添加一个 Environment.Newline 我会在文本框中得到一个新行.但是如果我添加两个 Environment.Newline 我会得到一个新行.在我的网络应用程序中,我使用了一个空格模块来删除所有不必要的空格.如果我禁用此模块,我的文本框中会出现两行新行.希望对您有所帮助.
I had the same problem. If I add one Environment.Newline I get one new line in the textbox. But if I add two Environment.Newline I get one new line. In my web app I use a whitespace modul that removes all unnecessary white spaces. If i disable this module I get two new lines in my textbox. Hope that helps.
这篇关于多行文本框多个换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)