如何从GridView的行删除HTML标签 [英] How to remove HTML tags from the gridview Row

查看:245
本文介绍了如何从GridView的行删除HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 CKEDITOR 功能的文本框。问题是,当我添加了文本框的文本和链接,并提交。我的见的HTML标签也像

我希望它是,无论何时添加的数据,应该隐藏/让看不见的HTML标记是什么。

也请参阅HTML code为文本框。

 < CKEditor的:ckeditorcontrol ID =txtreportdescription基本路径=/ CKEditor的/=服务器>


解决方案

禁用HTML中的通缉列渲染,尝试:

 < ASP:BoundField的数据字段=MyColumnHtmlEn code =FALSE/>

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">

解决方案

Disable the HTML render in the wanted column, Try :

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

这篇关于如何从GridView的行删除HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆