我有一个多行文本框,用作描述字段。可以使用空格和回车向此文本框添加大量信息。以段落格式。当我稍后显示此文本时,Label
我失去了所有格式,它变成了一堵文本墙。我能做些什么来保持原始格式吗?
var customerInfo = GetCustomerInfo(itemid);
if (customerInfo != null)
{
ItemID.Text = customerInfo.ItemID.ToString();
Description.Text = customerInfo.Description;
}
页面来源看起来像这样
This is a test
this is a test
this is a test
1. test
2. test
3. test
4. tes
标签/文字看起来像这样
This is a test this is a test this is a test 1. test 2. test 3. test 4. tes