How to remove HTML tags from the gridview Row

醉酒当歌 提交于 2019-12-13 04:43:58

问题


I have a textbox which uses the CKeditor functionality. The issue is that, when I add the text and links in the textboxes and submit it. I can the see the HTML tags also in the gridview like this

What I want it that, whenever the data is added, it should hide/ make invisible the HTML tags.

Also see the HTML code for the textbox.

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

回答1:


Disable the HTML render in the wanted column, Try :

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


来源:https://stackoverflow.com/questions/27719898/how-to-remove-html-tags-from-the-gridview-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!