0
我有描述元素的XML文件,描述很長,我怎麼能顯示它們作爲GridView中的格式文本。我嘗試在描述中添加<br/>
標籤,但asp.net頁面不顯示它們。Xml格式化數據到gridview asp.net C#
我有個結構名稱FileItems並且在描述字符串,所以從XML到該保存數據,
FileItems.AppDescription = xmlNode.ChildNodes[i].InnerText;
在的.aspx側我使用以下代碼來顯示:
<asp:BoundField DataField="AppDescription" HeaderText="AppDescription"
SortExpression="AppDescription">
<ItemStyle Width="55%"></ItemStyle>
</asp:BoundField>
在XML文件的樣本文本,
<description>
1. Lorem Ipsum is simply dummy text of the printing and typesetting industry.
2. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
3. When an unknown printer took a galley of type and scrambled it to make a type specimen book.
4. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
</description>