【问题标题】:how to preserve layout of text in a TextArea control如何在 TextArea 控件中保留文本布局
【发布时间】:2010-06-01 06:31:25
【问题描述】:

如何在 asp.net 的 TextArea 控件中保留文本布局?

例如

“这是一些文字:
- 第 1 行文本
- 第 2 行文本
- 第 3 行文字”

【问题讨论】:

  • TextArea 在什么 - html 或 flash 或其他什么?
  • 如果您的意思是尝试将其从 textarea 输出的文本中取出,请尝试将其放入
    ...content from text area here...
    ?

标签: asp.net text layout textarea


【解决方案1】:

问了这个,所以我发布了答案,因为我在网上其他任何地方都找不到......

您只需在文本字符串前加上“@”前缀,文本将保留其布局。例如:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-08
    • 2015-07-16
    • 2018-06-13
    • 2020-03-30
    • 2019-01-15
    • 1970-01-01
    相关资源
    最近更新 更多