MVC4 Razor confused about braces

后端 未结 5 1752
谎友^
谎友^ 2021-01-04 20:38

I\'ve got a fairly simple question for all the Razor experts out there. I\'m trying to make a jQuery $.ajax() call to a URL, using Url.Content() to translate the home-relat

5条回答
  •  臣服心动
    2021-01-04 21:13

    Update: Dave's less than symbol was not causing the problem, he only added it in his question for illustrative purposes.

    On MVC4 I was able to isolate the issue. This would not compile:

    
    

    But this would:

    
    

    Seems like it was just the < in the comment that was throwing it.

提交回复
热议问题