by marc walgren25. February 2013 07:41I created an XML file to use as a template for building a page response for ASP.NET app we use internally. One of the requirements was to have an empty table cell ("<td></td>"). The wrench in the works was the cell need to be underlined. As I modified the XML to include a " ", visual studio displayed and error - "Entity nbsp not defined".
The first alternate I replace the " " with " " - the corresponding numeric value. Visual studio was happy but when I viewed the page response built with my template I discovered "Â " displayed.
To solve the "wrong" character display I need to force the character set as well. I had to add a meta tag into the head section of my XML
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
That did the trick for me.
dd386062-b148-400e-962c-061506b42fe5|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags: C#, ASP.NET, XML
.NET