如何从自动编码的HTML实体停止GridView的列 [英] How to stop gridview column from automatically encoding html entities

查看:97
本文介绍了如何从自动编码的HTML实体停止GridView的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是相当新的asp.net,并提出了一个问题,同时使​​用一个GridView。

I am fairly new to asp.net and come into a problem whilst using a gridview.

我添加包含某些条目与&符号,例如公关墨菲放大器; Associates联系。
我还没有将它插入数据库完成了我的数据的任何编码之前

I have added some entries that contain the "&" symbol eg "PR Murphy & Associates". I haven't done any encoding of my data prior to inserting it into the database.

在GridView控件更改为编辑模式,我的文字是这样的:公关墨菲放大器; Associates的

When the gridview is changed to edit mode my text looks like this: "PR Murphy & Associates"

你是一个纽约的方式,我可以从编码信息阻止它,我的意思只是保持文本为公关墨菲放大器; Associates的插入和再经过/编辑期间,当

Is thee a ny way I can stop it from encoding the information, I mean just keep the text as "PR Murphy & Associates" when inserting and then after/during an edit.

感谢你

推荐答案

在GridView的菜单,您可以选择列,并在该列可以设置HTMLEn code为False(或True取决于性质的需要)。

In the GridView's menu, you can select the column and under the properties for that column you can set HTMLEncode to False (or True depending upon your needs).

这篇关于如何从自动编码的HTML实体停止GridView的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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