I had this code trace in my Razor view
@{
string markerPlacementScript = "alert('Hello')";
}
and use this in the javascript code block
<script> @markerPlacementScript </script>
But too bad , the javascript engine recognize the quote as ascii , hence
alert('Hello')
How do I let Javascript to parse it as quote ?
Many Thanks
Try this: