Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)?
cshtml
I am trying to add markers to a Google map...
What specific errors are you seeing?
Something like this could work better:
Note that you need the magical tag after the foreach to indicate that Razor should switch into markup mode.
foreach