【问题标题】:How to remove HTML tags from the gridview Row如何从 gridview 行中删除 HTML 标签
【发布时间】:2015-02-27 11:18:08
【问题描述】:

我有一个使用CKeditor 功能的文本框。问题是,当我在文本框中添加文本和链接并提交时。我也可以在网格视图中看到 HTML 标记,例如 this

我想要的是,无论何时添加数据,它都应该隐藏/使 HTML 标记不可见。

另请参阅文本框的 HTML 代码。

<ckeditor:ckeditorcontrol id="txtreportdescription" basepath="/ckeditor/" runat="server">

【问题讨论】:

标签: c# html asp.net gridview


【解决方案1】:

禁用所需列中的 HTML 渲染,试试:

<asp:BoundField DataField="MyColumn" HtmlEncode="false" />

【讨论】:

    猜你喜欢
    • 2010-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-17
    • 1970-01-01
    • 2019-11-29
    • 1970-01-01
    相关资源
    最近更新 更多