views:

1353

answers:

1

Hi all,

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

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.

When the gridview is changed to edit mode my text looks like this: "PR Murphy & 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.

Thanking you

+2  A: 

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).

TheTXI
The field is not a bound field though. It is a <asp:TextBox> inside a template field.
Jason