Frage

I have a variable in a resource file (.resx), the value having the word you'd.

When I try to use this variable directly in an alert box it displays you'd as you'd.

What could be the issue? and how do I resolve it?

War es hilfreich?

Lösung

Try this:

alert('@System.Web.HttpUtility.JavaScriptStringEncode("Hello, You'd like this.")');

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top