Using Razor within JavaScript

后端 未结 12 2320
萌比男神i
萌比男神i 2020-11-22 04:12

Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)?

I am trying to add markers to a Google map...

12条回答
  •  时光说笑
    2020-11-22 05:01

    One thing to add - I found that Razor syntax hilighter (and probably the compiler) interpret the position of the opening bracket differently:

    
    

提交回复
热议问题