Tracy Gough Tracy Gough - 9 months ago 46
ASP.NET (C#) Question

Entity Framework BindItem renders HTML escape instead of apostophe

I am using the Entity Framework to maintain data for 4.5 application. Any data that has an apostrophe (single quote) in the data is rendered in the web form's textbox as HTML escape

. I have verified the data is stored as expected in the database correctly. For example: I store the value
in the database but when I want to edit the data the textbox is populated with
. The code I have in the web form to populate the textbox vlaue is this:


How can I make this render the data correctly without the HTML escape?


I found the answer to this. The syntax <%#: actually implicitly forces HTML encoding due to the colon :. I removed the colon and it works as expected.