Hi All,
I tried to ask this question previously howver I did not recieve the correct response. I am using a GridView in the admin area of site I have designed. I use a DetailsView to insert data into the database, and the Gridview to edit and delete the data.
My query is: When I add data in the DetailsView I enter data like this: "PR Murphy & Associates" Notice the "&".
WHat is happening is that when it display the data in the gridview it displays it as "PR Murphy & Associates" however when I click the edit button it displays "PR Murphy & Associates". Notice the encoded & symbol.
My problem is that I don't want the code to htmlencode the & symbol at all. I am fairly new to ASP.NET and am not sure how to achieve this goal.
IE Is the DetailsView encoding the string when it inserts the data into the database. What code could I use to stop this from happening and what event would I need to target.
In my previous response it was suggested that I set HTMLEncode="False" in the gridview. I have tried that with a bound field and it did not make a difference. Also I need this field to be as a TemplateField in the GridView so that I can perform some error handling on the entries.
I hope this makes sense and someone can please guide me in the right directions.
Thanks