Last post Nov 05, 2015 02:42 AM by Fei Han - MSFT
Nov 04, 2015 04:12 PM|Galaxy_Stranger|LINK
I have an issue where I have come across some problematic characters when pulling data from the database and displaying it, such as apostrophes. This has lead me to writing ASCII codes for characters - as you might normally do in HTML.
When I use these ASCII codes in the page - they display the character correctly. When I use them on the .NET controls - they just display the ASCII code. I presume there's some sort of sanitizing going on.
Is there a way around this?
Nov 04, 2015 05:49 PM|PatriceSc|LINK
Seems you are using a control which HTML encode your string causing it to be shown exactly as you build it rather than how you expect. I would suggest though to explain what is your first issue. Which control are you using and what is the exact problem you
have with apostrophes?
Nov 05, 2015 02:42 AM|Fei Han - MSFT|LINK
The following code works fine on my side, I’d like to know which control are you using?
<asp:Label ID="Label1" runat="server" Text="…"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Text="…"></asp:TextBox>
<input id="Text1" type="text" value="…" />